namespace Rapsys\UserBundle\Checker;
 
+use Rapsys\UserBundle\Entity\User;
+use Rapsys\UserBundle\Exception\UnactivatedException;
+
 use Symfony\Component\Security\Core\User\InMemoryUserChecker;
 use Symfony\Component\Security\Core\Exception\DisabledException;
 use Symfony\Component\Security\Core\User\UserInterface;
 
-use Rapsys\UserBundle\Entity\User;
-use Rapsys\UserBundle\Exception\UnactivatedException;
-
 /**
  * {@inheritdoc}
  */
                        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);
        }