Force blocked users to logout.

This commit is contained in:
James Cole 2016-02-06 22:14:51 +01:00
parent 649eb65bb1
commit eddd3e508f

View File

@ -29,9 +29,12 @@ class Authenticate
if ($request->ajax()) {
return response('Unauthorized.', 401);
} else {
return redirect()->guest('login');
}
} else {
if(intval(Auth::user()->blocked) === 1) {
return redirect()->action('logout');
}
}
return $next($request);