當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Model_Users::delete方法代碼示例

本文整理匯總了PHP中Model_Users::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model_Users::delete方法的具體用法?PHP Model_Users::delete怎麽用?PHP Model_Users::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Model_Users的用法示例。


在下文中一共展示了Model_Users::delete方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 public function delete()
 {
     if (!($id = $this->getRequest()->getId())) {
         $this->getResponse()->setBody(array('status' => 'failed', 'message' => 'ID required'));
         return;
     }
     $this->users->delete(addslashes($id));
     $this->getResponse()->setBody(array('status' => 'success', 'message' => 'User deleted'));
 }
開發者ID:AlphaStaxLLC,項目名稱:opensimulatorapi,代碼行數:9,代碼來源:Users.php

示例2: delete

 /**
  * delete an admin user
  *
  * @param int $userId
  */
 public function delete($userId)
 {
     $modelUsersAdmins = new Admin_Model_Users_Admins();
     $modelUsersAdmins->delete($userId);
     parent::delete($userId);
 }
開發者ID:AlexanderMazaletskiy,項目名稱:gym-Tracker-App,代碼行數:11,代碼來源:Users.php

示例3: deleteAction

 public function deleteAction()
 {
     $modelUsers = new Model_Users();
     $modelAdminUsers = new Admin_Model_Users();
     $userId = $this->_getParam('userId');
     if (vkNgine_Config::getSystemConfig()->master->user == $userId) {
         return new vkNgine_Exception('This user can\'t be deleted');
     }
     $userInfo = $modelUsers->fetch($userId);
     $modelUsers->delete($userId);
     $modelAdminUsers->delete($userId);
     echo Zend_Json::encode(array('success' => 1, 'itemId' => $userId, 'rowId' => 'user-', 'title' => $this->t->_('Success Message'), 'message' => sprintf($this->t->_('%s was successfully deleted'), $userInfo->getFullName()), 'icon' => 'success'));
     exit;
 }
開發者ID:AlexanderMazaletskiy,項目名稱:gym-Tracker-App,代碼行數:14,代碼來源:UsersController.php

示例4: delete

 /**
  * delete a user
  *
  * @param int $userId
  */
 public function delete($userId)
 {
     $modelUsersPublics = new Model_Users_Publics();
     $modelUsersPublics->delete($userId);
     parent::delete($userId);
 }
開發者ID:AlexanderMazaletskiy,項目名稱:gym-Tracker-App,代碼行數:11,代碼來源:Users.php


注:本文中的Model_Users::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。