Пример #1
0
 public function loginAction()
 {
     $service = new Service_User();
     if ($service->getCurrentUser()->role_id == Model_Role::ADMIN) {
         $this->_helper->redirector('index');
     }
     if ($data = $this->_request->getPost()) {
         if ($service->login($data)) {
             $this->_helper->redirector('index');
         }
     }
     $this->view->message = $service->getMessage();
     $this->view->form = $service->getForm();
 }