code: private function checkIfLoginIsAllowed(User $user): void
      {
          if (!$user instanceof FrontendUser || $user->login) {
              return;
          }
  
          $ex = new DisabledException(sprintf('User "%s" is not allowed to log in', $user->username));
          $ex->setUser($user);
  
          throw $ex;
      }
docs: Checks wether login is allowed (front end only).