Example #1
0
 public function action_login()
 {
     $d = $this->verify($this->get_form());
     if (!$d) {
         $this->action_index();
         return;
     }
     if (!Model_Db_Admin::login($d['email'], $d['password'], $d['remember'])) {
         $this->msg('メールアドレスまたはパスワードが違います');
         $this->action_index();
         return;
     }
     return Response::redirect('index');
 }
Example #2
0
 protected function get_user()
 {
     return Model_Db_Admin::by_session();
 }
Example #3
0
 public function action_logout()
 {
     Model_Db_Admin::logout();
     return Response::redirect('admin');
 }