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,10 +83,16 @@ class UserController extends Zend_Controller_Action
|
||||||
public function removeUserAction()
|
public function removeUserAction()
|
||||||
{
|
{
|
||||||
// action body
|
// action body
|
||||||
$id = $this->_getParam('id');
|
$delId = $this->_getParam('id');
|
||||||
$user = new User($id);
|
|
||||||
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
$this->view->entries = $user->delete();
|
$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