本文整理汇总了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'));
}
示例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);
}
示例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;
}
示例4: delete
/**
* delete a user
*
* @param int $userId
*/
public function delete($userId)
{
$modelUsersPublics = new Model_Users_Publics();
$modelUsersPublics->delete($userId);
parent::delete($userId);
}