public function deleteAction() { $authorization = Zend_Auth::getInstance(); $identity = $authorization->getIdentity(); if ($identity->user_type == "admin") { $id = $this->getRequest()->getParam('id'); if ($id) { $model = new Application_Model_Users(); $model->deleteUser($id); } $this->redirect("users/list"); } else { $this->view->user_msg = "The page not allowed for normal user."; $this->_redirect("/users/login"); } }