diff --git a/backend/app/Http/Requests/Auth/LoginRequest.php b/backend/app/Http/Requests/Auth/LoginRequest.php index f5692bf..c99dde2 100644 --- a/backend/app/Http/Requests/Auth/LoginRequest.php +++ b/backend/app/Http/Requests/Auth/LoginRequest.php @@ -49,6 +49,15 @@ class LoginRequest extends FormRequest ]); } + // Check if the authenticated user's account is active + if (! Auth::user()->active) { + Auth::logout(); + + throw ValidationException::withMessages([ + 'email' => __('auth.inactive_account'), + ]); + } + RateLimiter::clear($this->throttleKey()); }