translator = $translator; } /** * Checks the user account before authentication. * * @throws AccountStatusException */ public function checkPreAuth(UserInterface $user) { // TODO: Implement checkPreAuth() method. } /** * Checks the user account after authentication. * * @throws AccountStatusException */ public function checkPostAuth(UserInterface $user) { if (!$user instanceof User) { return; } //Check if user is disabled. Then dont allow login if ($user->isDisabled()) { throw new DisabledException(); } } }