Page MenuHomePhabricator

D19904.id47592.diff
No OneTemporary

D19904.id47592.diff

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';
}

File Metadata

Mime Type
text/plain
Expires
Thu, May 9, 3:39 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6275090
Default Alt Text
D19904.id47592.diff (2 KB)

Event Timeline