public function deleteAction()
 {
     $user = $this->_getUser();
     $this->_helper->allowed('delete', $user);
     $this->_userSrv->delete($user);
     $this->getResponse()->setHttpResponseCode(204);
     $this->_helper->viewRenderer->setNoRender(TRUE);
 }
 /**
  * Deletes the given user
  */
 public function deleteAction()
 {
     // Try to load the chosen user
     $userId = $this->getRequest()->getParam('id');
     $user = $this->_userSrv->load($userId);
     if (empty($user)) {
         throw new NotFoundException('User ' . $userId . ' not found', 404);
     }
     // Check permissions
     $this->_helper->allowed('delete', $user);
     // Remove the user
     $this->_userSrv->delete($userId);
     $this->view->data = true;
 }