コード例 #1
0
ファイル: UserController.php プロジェクト: mtaha1990/onlineDR
 public function deleteAction()
 {
     $id = $this->_request->getParam('id');
     $mdlUseruserModel = new Model_User();
     $mdlUseruserModel->deleteUser($id);
     return $this->_forward('list');
 }
コード例 #2
0
ファイル: delete.php プロジェクト: d10cn2btt/studyBtt
<?php

/**
 * Created by PhpStorm.
 * User: MSI
 * Date: 12-May-16
 * Time: 4:30 PM
 */
$mUser = new Model_User();
$mUser->deleteUser($_GET['id_user']);
redirect("index.php?controller=user&action=list");
コード例 #3
0
ファイル: UserController.php プロジェクト: Arteaga2k/nolotiro
 public function deleteAction()
 {
     $this->view->headTitle()->append($this->view->translate('Delete your profile'));
     $id = (int) $this->getRequest()->getParam('id');
     $auth = Zend_Auth::getInstance();
     if (!$auth->getIdentity()->id) {
         $this->_helper->_flashMessenger->addMessage($this->view->translate('You are not allowed to view this page'));
         $this->_redirect('/' . $this->view->lang . '/woeid/' . $this->location . '/give');
         return;
     }
     $model = new Model_User();
     $user = $model->fetchUser($id)->id;
     if ($auth->getIdentity()->id == $user) {
         //if is the user profile owner lets delete it
         if ($this->getRequest()->isPost()) {
             $del = $this->getRequest()->getPost('del');
             if ($del == 'Yes') {
                 // delete user
                 $model->deleteUser($id);
                 // logout
                 $this->_helper->_flashMessenger->addMessage($this->view->translate('Your account has been deleted.'));
                 $this->_redirect('/' . $this->view->lang . '/auth/logout');
                 return;
             } else {
                 $this->_helper->_flashMessenger->addMessage($this->view->translate('Nice to hear that :-)'));
                 $this->_redirect('/' . $this->view->lang . '/woeid/' . $this->location . '/give');
                 return;
             }
         } else {
             $id = $this->_getParam('id', 0);
         }
     } else {
         $this->_helper->_flashMessenger->addMessage($this->view->translate('You are not allowed to view this page'));
         $this->_redirect('/' . $this->view->lang . '/woeid/' . $this->location . '/give');
         return;
     }
 }
コード例 #4
0
ファイル: del.php プロジェクト: ntsasng/app
<?php

$id = $_GET['uid'];
$muser = new Model_User();
$muser->deleteUser($id);
redirect("{$baseurl}/user/list");
コード例 #5
0
ファイル: Dashboard.php プロジェクト: alextoshinov/musyme
 public function action_deleteUser()
 {
     $this->auto_render = FALSE;
     $this->template->show_logout = TRUE;
     $this->template->title = 'Delete user';
     $id = $this->request->param('id');
     $r = Model_User::deleteUser($id);
     if ($r) {
         print 'success';
     } else {
         print 'error';
     }
 }