diff --git a/src/applications/auth/controller/PhabricatorAuthController.php b/src/applications/auth/controller/PhabricatorAuthController.php --- a/src/applications/auth/controller/PhabricatorAuthController.php +++ b/src/applications/auth/controller/PhabricatorAuthController.php @@ -55,44 +55,29 @@ $response = $this->buildLoginValidateResponse($user); $session_type = PhabricatorAuthSession::TYPE_WEB; - $event_type = PhabricatorEventType::TYPE_AUTH_WILLLOGINUSER; - $event_data = array( - 'user' => $user, - 'type' => $session_type, - 'response' => $response, - 'shouldLogin' => true, - ); - - $event = id(new PhabricatorEvent($event_type, $event_data)) - ->setUser($user); - PhutilEventEngine::dispatchEvent($event); - - $should_login = $event->getValue('shouldLogin'); - if ($should_login) { - if ($force_full_session) { - $partial_session = false; - } else { - $partial_session = true; - } + if ($force_full_session) { + $partial_session = false; + } else { + $partial_session = true; + } - $session_key = id(new PhabricatorAuthSessionEngine()) - ->establishSession($session_type, $user->getPHID(), $partial_session); + $session_key = id(new PhabricatorAuthSessionEngine()) + ->establishSession($session_type, $user->getPHID(), $partial_session); - // NOTE: We allow disabled users to login and roadblock them later, so - // there's no check for users being disabled here. + // NOTE: We allow disabled users to login and roadblock them later, so + // there's no check for users being disabled here. - $request = $this->getRequest(); - $request->setCookie( - PhabricatorCookies::COOKIE_USERNAME, - $user->getUsername()); - $request->setCookie( - PhabricatorCookies::COOKIE_SESSION, - $session_key); + $request = $this->getRequest(); + $request->setCookie( + PhabricatorCookies::COOKIE_USERNAME, + $user->getUsername()); + $request->setCookie( + PhabricatorCookies::COOKIE_SESSION, + $session_key); - $this->clearRegistrationCookies(); - } + $this->clearRegistrationCookies(); - return $event->getValue('response'); + return $response; } protected function clearRegistrationCookies() { diff --git a/src/infrastructure/events/constant/PhabricatorEventType.php b/src/infrastructure/events/constant/PhabricatorEventType.php --- a/src/infrastructure/events/constant/PhabricatorEventType.php +++ b/src/infrastructure/events/constant/PhabricatorEventType.php @@ -22,7 +22,6 @@ const TYPE_PEOPLE_DIDRENDERMENU = 'people.didRenderMenu'; const TYPE_AUTH_WILLREGISTERUSER = 'auth.willRegisterUser'; - const TYPE_AUTH_WILLLOGINUSER = 'auth.willLoginUser'; const TYPE_AUTH_DIDVERIFYEMAIL = 'auth.didVerifyEmail'; }