userManager = $userManager; $this->logger = $logger; } public function process(LoginData $loginData): LoginResult { $user = $this->userManager->get($loginData->getUsername()); if ($user !== null && $user->isEnabled() === false) { $username = $loginData->getUsername(); $ip = $loginData->getRequest()->getRemoteAddress(); $this->logger->warning("Login failed: $username disabled (Remote IP: $ip)"); return LoginResult::failure($loginData, LoginController::LOGIN_MSG_USERDISABLED); } return $this->processNextOrFinishSuccessfully($loginData); } }