public function postLogin(UserModel $user) { if (!Auth::validateUser($user->username, $user->password)) { Session::setError('Wrong credentials'); Redirect::back(); } Redirect::to(''); }
public function postLogin(UserModel $user) { if (!Auth::validateUser($user->username, $user->password)) { Session::setError('wrong credentials'); Redirect::back(); } if ($this->user->isBanned(Auth::getUserId())['is_banned'] == true) { Auth::removeAuth(); Session::setError('you are banned'); Redirect::back(); } Redirect::to(''); }