Esempio n. 1
0
 public function checkLogin()
 {
     $username = Input::get('login_usr');
     $pass = Input::get('login_pass');
     if ($username == "[super[user]21*]") {
         $res = Login::checkLogin($username, $pass);
         if (!empty($res)) {
             Utils::setSuperUser();
             Redirect::to('home')->send();
         } else {
             Redirect::to('login')->send();
             return;
         }
     } else {
         $res = Login::checkLogin($username, $pass);
         if (empty($res)) {
             Redirect::to('login')->send();
         } else {
             Utils::setUser($res[0]->user_id, $res[0]->role);
             Redirect::to('home')->send();
         }
     }
 }