Fix test error on kick-out inactive user

This commit is contained in:
Bubka 2022-05-10 00:59:07 +02:00
parent a571095e11
commit 7f2806e7d9

View File

@ -42,7 +42,9 @@ public function handle($request, Closure $next, ...$quards)
$user->save();
Log::notice('Inactive user detected, authentication rejected');
if (method_exists('Illuminate\Support\Facades\Auth', 'logout')) {
Auth::logout();
}
return response()->json(['message' => 'unauthorised'], Response::HTTP_UNAUTHORIZED);
}