]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Checker/UserChecker.php
Rename pack bundle name
[userbundle] / Checker / UserChecker.php
index e34284e92e0cd94a0b0c4c6416e442fda865c920..7ea72ffceebfa00361c85be369cfef90d8589951 100644 (file)
@@ -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);
        }
 }