Esempio n. 1
0
 /**
  * deleteAction for Users
  *
  * @return void
  */
 public function deleteAction()
 {
     if ($this->getRequest()->isPost()) {
         $del = $this->getRequest()->getPost('del');
         if ($del == 'Yes') {
             $id = $this->getRequest()->getPost('id');
             $model = new User_Model_Users();
             $model->delete('id = ' . (int) $id);
         }
         return $this->_helper->redirector('index');
     } else {
         $id = $this->_getParam('id', 0);
         if ($id > 0) {
             $model = new User_Model_Users();
             $this->view->user = $model->fetchEntry($id);
         }
     }
 }