FIX: fix minor bug in user management
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user