示例#1
0
 /**
  * Log In
  */
 public function action_login()
 {
     Auth::check() and Reponse::redirect('admin');
     $data['username'] = null;
     if (Input::post('login')) {
         if (Auth::instance()->login()) {
             Session::set_flash('notice', __('Welcome back!'));
             Response::redirect('admin');
         }
         Session::set_flash('notice', __('Wrong username/password combo. Try again.'));
         $data['username'] = Input::post('username');
     }
     $this->template->title = __('Log In');
     $this->template->content = View::forge('admin/login', $data);
 }