当前位置: 首页>>代码示例>>PHP>>正文


PHP Model_User::deleteUser方法代码示例

本文整理汇总了PHP中Model_User::deleteUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_User::deleteUser方法的具体用法?PHP Model_User::deleteUser怎么用?PHP Model_User::deleteUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Model_User的用法示例。


在下文中一共展示了Model_User::deleteUser方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: deleteAction

 public function deleteAction()
 {
     $id = $this->_request->getParam('id');
     $mdlUseruserModel = new Model_User();
     $mdlUseruserModel->deleteUser($id);
     return $this->_forward('list');
 }
开发者ID:mtaha1990,项目名称:onlineDR,代码行数:7,代码来源:UserController.php

示例2:

<?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");
开发者ID:d10cn2btt,项目名称:studyBtt,代码行数:11,代码来源:delete.php

示例3: deleteAction

 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;
     }
 }
开发者ID:Arteaga2k,项目名称:nolotiro,代码行数:37,代码来源:UserController.php

示例4:

<?php

$id = $_GET['uid'];
$muser = new Model_User();
$muser->deleteUser($id);
redirect("{$baseurl}/user/list");
开发者ID:ntsasng,项目名称:app,代码行数:6,代码来源:del.php

示例5: action_deleteUser

 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';
     }
 }
开发者ID:alextoshinov,项目名称:musyme,代码行数:13,代码来源:Dashboard.php


注:本文中的Model_User::deleteUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。