summaryrefslogtreecommitdiffstats
path: root/Core/User
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2013-12-30 22:49:15 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2013-12-31 11:55:25 +0100
commitf3427fa7d44637866e038bf49ae336509e99800b (patch)
tree9c05b8561074da10ab033cc31e7b63652fea6f65 /Core/User
parent47a99c77ac4ea45ab1e20b3d95450cd39204e123 (diff)
downloadsymfony-security-f3427fa7d44637866e038bf49ae336509e99800b.zip
symfony-security-f3427fa7d44637866e038bf49ae336509e99800b.tar.gz
symfony-security-f3427fa7d44637866e038bf49ae336509e99800b.tar.bz2
[Security] fixed pre/post authentication checks
Diffstat (limited to 'Core/User')
-rw-r--r--Core/User/UserChecker.php32
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;
+ }
+ }
}