Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15391196
D19904.id47592.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D19904.id47592.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 8:38 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7590854
Default Alt Text
D19904.id47592.diff (2 KB)
Attached To
Mode
D19904: Remove support for the "TYPE_AUTH_WILLLOGIN" event
Attached
Detach File
Event Timeline
Log In to Comment