From 3f2d2c6438f671601fcaa3fe05b71618128f5048 Mon Sep 17 00:00:00 2001 From: Andrej Date: Tue, 4 Nov 2025 17:27:08 +0100 Subject: [PATCH] overenie aktivneho uctu pri prihlasovani --- backend/app/Http/Requests/Auth/LoginRequest.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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()); }