Example #1
0
 public function undeleteAction()
 {
     $request = $this->getRequest();
     $id = $request->getParam('id');
     $logic = new Logic_User();
     $logic->find($id);
     $login = $logic->getFullLogin();
     try {
         $logic->undelete();
         $cache = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('cachemanager')->getCache('rolecache');
         $cache->clean(Zend_Cache::CLEANING_MODE_ALL);
         $this->_helper->success();
         $this->_helper->AdminActionLog->undelete('uzytkownik', 'przywrócenie ' . $logic->getFullName() . ' (login: '******')', 'error', $logic);
         $this->_helper->redirector('index');
         return;
     } catch (Logic_Uzytkownik_Exception $e) {
         $this->_helper->AdminActionLog->undelete('uzytkownik', 'przywrócenie ' . $logic->getFullName() . ' (login: '******')', 'error', $logic);
         $this->_helper->error(MSG_ERROR, $e);
     }
 }