mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Force blocked users to logout.
This commit is contained in:
parent
649eb65bb1
commit
eddd3e508f
@ -29,9 +29,12 @@ class Authenticate
|
|||||||
if ($request->ajax()) {
|
if ($request->ajax()) {
|
||||||
return response('Unauthorized.', 401);
|
return response('Unauthorized.', 401);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return redirect()->guest('login');
|
return redirect()->guest('login');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if(intval(Auth::user()->blocked) === 1) {
|
||||||
|
return redirect()->action('logout');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
Loading…
Reference in New Issue
Block a user