diff --git a/airtime_mvc/application/controllers/UserController.php b/airtime_mvc/application/controllers/UserController.php index 28ed5c5dc..24d9d78d8 100644 --- a/airtime_mvc/application/controllers/UserController.php +++ b/airtime_mvc/application/controllers/UserController.php @@ -83,10 +83,16 @@ class UserController extends Zend_Controller_Action public function removeUserAction() { // action body - $id = $this->_getParam('id'); - $user = new User($id); - - $this->view->entries = $user->delete(); + $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(); + } + }