public function listAction() { $notif = new Admin_Model_Notification(); $notif->update(); $this->loadPartials(); }
public function loginpostAction() { if ($datas = $this->getRequest()->getPost()) { $this->getSession()->resetInstance(); $canBeLoggedIn = false; try { if (empty($datas['email']) or empty($datas['password'])) { throw new Exception($this->_('Authentication failed. Please check your email and/or your password')); } $admin = new Admin_Model_Admin(); $admin->findByEmail($datas['email']); if ($admin->authenticate($datas['password'])) { $this->getSession()->setAdmin($admin); } if (!$this->getSession()->isLoggedIn()) { throw new Exception($this->_('Authentication failed. Please check your email and/or your password')); } $notif = new Admin_Model_Notification(); $notif->update(); } catch (Exception $e) { $this->getSession()->addError($e->getMessage()); } } $this->_redirect('/'); return $this; }