From 06a34d58957f5590c733a24d9ada510b5c3e5afd Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Fri, 21 Jun 2019 14:14:23 -0700 Subject: [PATCH] Drop the UserLoadFromSession hook, deprecated in 1.27 Change-Id: Ic86d9ee1fe6763270e79e31296ecd027e5d41be2 --- RELEASE-NOTES-1.34 | 1 + docs/hooks.txt | 8 -------- includes/user/User.php | 7 ------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 0ca5adbd00..43e128af8c 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -238,6 +238,7 @@ because of Phabricator reports. UserGroupsChanged hook. * Skin::getDefaultInstance(), deprecated in 1.27, has been removed. Get the instance from MediaWikiServices instead. +* The UserLoadFromSession hook, deprecated in 1.27, has been removed. * … === Deprecations in 1.34 === diff --git a/docs/hooks.txt b/docs/hooks.txt index e3ea66ecea..99a3d1abc7 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3744,14 +3744,6 @@ $name: user name $user: user object &$s: database query object -'UserLoadFromSession': DEPRECATED since 1.27! Create a -MediaWiki\Session\SessionProvider instead. -Called to authenticate users on external/environmental means; occurs before -session is loaded. -$user: user object being loaded -&$result: set this to a boolean value to abort the normal authentication - process - 'UserLoadOptions': When user options/preferences are being loaded from the database. $user: User object diff --git a/includes/user/User.php b/includes/user/User.php index 3a57c0b3eb..6025d3cf1a 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1346,13 +1346,6 @@ class User implements IDBAccessObject, UserIdentity { * @return bool True if the user is logged in, false otherwise. */ private function loadFromSession() { - // Deprecated hook - $result = null; - Hooks::run( 'UserLoadFromSession', [ $this, &$result ], '1.27' ); - if ( $result !== null ) { - return $result; - } - // MediaWiki\Session\Session already did the necessary authentication of the user // returned here, so just use it if applicable. $session = $this->getRequest()->getSession(); -- 2.20.1