mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
Force blocked users to logout.
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user