diff options
Diffstat (limited to 'Core/User')
-rw-r--r-- | Core/User/UserChecker.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Core/User/UserChecker.php b/Core/User/UserChecker.php index 8dde3a6..ac577a3 100644 --- a/Core/User/UserChecker.php +++ b/Core/User/UserChecker.php @@ -32,22 +32,6 @@ class UserChecker implements UserCheckerInterface return; } - if (!$user->isCredentialsNonExpired()) { - $ex = new CredentialsExpiredException('User credentials have expired.'); - $ex->setUser($user); - throw $ex; - } - } - - /** - * {@inheritdoc} - */ - public function checkPostAuth(UserInterface $user) - { - if (!$user instanceof AdvancedUserInterface) { - return; - } - if (!$user->isAccountNonLocked()) { $ex = new LockedException('User account is locked.'); $ex->setUser($user); @@ -66,4 +50,20 @@ class UserChecker implements UserCheckerInterface throw $ex; } } + + /** + * {@inheritdoc} + */ + public function checkPostAuth(UserInterface $user) + { + if (!$user instanceof AdvancedUserInterface) { + return; + } + + if (!$user->isCredentialsNonExpired()) { + $ex = new CredentialsExpiredException('User credentials have expired.'); + $ex->setUser($user); + throw $ex; + } + } } |