X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/c2a35920b8751374e24723703026f57a62ef41b6..d3c0403000560ca0fd1b08fced1e043584bf4e54:/Checker/UserChecker.php?ds=inline diff --git a/Checker/UserChecker.php b/Checker/UserChecker.php index e34284e..7ea72ff 100644 --- a/Checker/UserChecker.php +++ b/Checker/UserChecker.php @@ -32,17 +32,20 @@ class UserChecker extends InMemoryUserChecker { } //With not activated user - if (!$user->isActivated()) { - $ex = new UnactivatedException('Account is not activated'); - $ex->setUser($user); - throw $ex; - } - - //With disabled user - if ($user->isDisabled()) { - $ex = new DisabledException('Account is disabled'); - $ex->setUser($user); - throw $ex; - } + if (!$user->isActivated()) { + $ex = new UnactivatedException('User Account is not activated'); + $ex->setUser($user); + 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); } }