From: Thalia Date: Mon, 9 Sep 2019 15:57:17 +0000 (+0100) Subject: Deprecate the UserIsHidden hook X-Git-Tag: 1.34.0-rc.0~302 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=af24fc1a7a52df5b5ad7157aa9d27b76c1a26ef4;p=lhc%2Fweb%2Fwiklou.git Deprecate the UserIsHidden hook This was replaced by GetUserBlock in 7a5508573a. Handlers in production were updated to use GetUserBlock in Ibbcd3a239. Bug: T228948 Change-Id: I3e6da73e595e2bd6a96600fe2a6dc68a54d06a2e --- diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index e0f4752188..2e220afa3c 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -530,6 +530,8 @@ because of Phabricator reports. * Specifying both the class and factory parameters for ApiModuleManager::addModule is now deprecated. The ObjectFactory spec should be used instead. +* The UserIsHidden hook is deprecated. Use GetUserBlock instead, and add a + system block that hides the user. === Other changes in 1.34 === * … diff --git a/docs/hooks.txt b/docs/hooks.txt index a248c29075..43234c6590 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3729,7 +3729,9 @@ $ip: User's IP address false if a UserGetRights hook might remove the named right. $right: The user right being checked -'UserIsHidden': Check if the user's name should be hidden. See User::isHidden(). +'UserIsHidden': DEPRECATED since 1.34 - use GetUserBlock instead, and add a +system block that hides the user. Check if the user's name should be hidden. +See User::isHidden(). $user: User in question. &$hidden: Set true if the user's name should be hidden. diff --git a/includes/user/User.php b/includes/user/User.php index 666f2b6979..6893bf48fa 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -2169,7 +2169,7 @@ class User implements IDBAccessObject, UserIdentity { if ( !$this->mHideName ) { // Reset for hook $this->mHideName = false; - Hooks::run( 'UserIsHidden', [ $this, &$this->mHideName ] ); + Hooks::run( 'UserIsHidden', [ $this, &$this->mHideName ], '1.34' ); } return (bool)$this->mHideName; }