Deprecate the UserIsHidden hook
authorThalia <thalia.e.chan@googlemail.com>
Mon, 9 Sep 2019 15:57:17 +0000 (16:57 +0100)
committerThalia <thalia.e.chan@googlemail.com>
Mon, 9 Sep 2019 19:31:02 +0000 (20:31 +0100)
This was replaced by GetUserBlock in 7a5508573a.

Handlers in production were updated to use GetUserBlock in
Ibbcd3a239.

Bug: T228948
Change-Id: I3e6da73e595e2bd6a96600fe2a6dc68a54d06a2e

RELEASE-NOTES-1.34
docs/hooks.txt
includes/user/User.php

index e0f4752..2e220af 100644 (file)
@@ -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 ===
 * …
index a248c29..43234c6 100644 (file)
@@ -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.
 
index 666f2b6..6893bf4 100644 (file)
@@ -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;
        }