From 3e7a34ac74e57f4a78d75dcc1f05438759b7ee03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Mon, 11 Dec 2023 03:13:56 +0100 Subject: [PATCH 1/1] Add is enabled check --- Checker/UserChecker.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Checker/UserChecker.php b/Checker/UserChecker.php index 744a35e..7ea72ff 100644 --- a/Checker/UserChecker.php +++ b/Checker/UserChecker.php @@ -38,6 +38,13 @@ class UserChecker extends InMemoryUserChecker { throw $ex; } + //With not enabled user + if (!$user->isEnabled()) { + $ex = new DisabledException('User account is not enabled'); + $ex->setUser($user); + throw $ex; + } + //Call parent checkPreAuth parent::checkPostAuth($user); } -- 2.41.1