private function loadUser($identity) { if(!isset($this->_umapper)) { $umapper = new App_Model_UserMapper(new App_Model_Daos_Users()); } $user = $umapper->fetchFiltered($umapper->getDao()->getAdapter()->quoteInto("username = ?",$identity)); return $user[0]; }
public function deleteAction() { $id = $this->getRequest()->getParam('id'); $this->view->title = "Delete User "; $this->view->headTitle($this->view->title); if ($this->getRequest()->isPost()) { $del = $this->getRequest()->getPost('del'); if ($del == 'Yes') { $id = $this->getRequest()->getPost('id'); $tbl = new App_Model_User(); $mapper = new App_Model_UserMapper(); $row = $tbl->find($id); $mapper->delete($tbl); } $this->_helper->redirector('index'); } else { $tbl = new App_Model_User(); $this->view->id = $id; } }
public function find($id) { $mapper = new App_Model_UserMapper(); $mapper->find($id, $this); }