FIX: fix minor bug in user management

This commit is contained in:
Michal Kváček
2017-08-02 13:52:19 +02:00
parent a4c020daa0
commit 3d73bffa6e
5 changed files with 8 additions and 7 deletions
+2 -3
View File
@@ -20,7 +20,7 @@ class Authenticate
public function handle($request, Closure $next, $guard = null)
{
if (!Auth::guard($guard)
->check() || Auth::user()->status != User::STATE_ACTIVE || Auth::user()->role == User::ROLE_VISITOR) {
->check() || Auth::user()->status != User::STATE_ACTIVE || Auth::user()->role == User::ROLE_VISITOR || 0) {
Auth::logout();
if ($request->ajax()) {
@@ -38,8 +38,7 @@ class Authenticate
return redirect()
->route('login')
->with('warning', trans($message))
->with('redirectTo', $request->fullUrl());
->with('warning', trans($message));
}
return $next($request);