Middleware Issue Fixed
This commit is contained in:
parent
e4a7c72c36
commit
687e13d49f
|
|
@ -20,6 +20,16 @@ class Bouncer
|
|||
return redirect()->route('admin.session.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* If user status is changed by admin. Then session should be
|
||||
* logged out.
|
||||
*/
|
||||
if (! (bool) auth()->guard($guard)->user()->status) {
|
||||
auth()->guard($guard)->logout();
|
||||
|
||||
return redirect()->route('admin.session.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* If somehow the user deleted all permissions, then it should be
|
||||
* auto logged out and need to contact the administrator again.
|
||||
|
|
|
|||
Loading…
Reference in New Issue