]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Checker/UserChecker.php
Adapt entity and user checker to match with symfony classes and interfaces
[userbundle] / Checker / UserChecker.php
index e34284e92e0cd94a0b0c4c6416e442fda865c920..744a35e37403228eb6a87b6030b93e346ffd0a09 100644 (file)
@@ -32,17 +32,13 @@ class UserChecker extends InMemoryUserChecker {
                }
 
                //With not activated user
-        if (!$user->isActivated()) {
-            $ex = new UnactivatedException('Account is not activated');
-            $ex->setUser($user);
-            throw $ex;
-        }
+               if (!$user->isActivated()) {
+                       $ex = new UnactivatedException('User 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;
-        }
+               //Call parent checkPreAuth
+               parent::checkPostAuth($user);
        }
 }