-cc-2126: user should not be able to delete himself
added server side check
This commit is contained in:
parent
df3b24d3ad
commit
a937dcb5ac
|
@ -83,10 +83,16 @@ 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();
|
||||
}
|
||||
|
||||
$this->view->entries = $user->delete();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue