Improve the cron controller. Force blocked users to logout.

This commit is contained in:
James Cole
2015-07-24 13:17:47 +02:00
parent 3c68c99bd5
commit 9b83974bff
2 changed files with 16 additions and 11 deletions

View File

@@ -52,6 +52,11 @@ class Authenticate
return redirect()->guest('auth/login');
}
}
if (intval($this->auth->user()->blocked) == 1) {
return redirect()->route('logout');
}
// if logged in, set user language:
$pref = Preferences::get('language', 'en');
App::setLocale($pref->data);