Merge branch 'cc-2126-user-should-not-be-able-delete-himself' into devel
This commit is contained in:
commit
91caaf2c0f
1 changed files with 10 additions and 4 deletions
|
@ -83,12 +83,18 @@ class UserController extends Zend_Controller_Action
|
|||
public function removeUserAction()
|
||||
{
|
||||
// action body
|
||||
$id = $this->_getParam('id');
|
||||
$user = new User($id);
|
||||
$delId = $this->_getParam('id');
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$userId = $userInfo->id;
|
||||
|
||||
if ($delId != $userId){
|
||||
$user = new User($delId);
|
||||
$this->view->entries = $user->delete();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue