Manual:Hooks/UserIsHidden

UserIsHidden
Available from version 1.26.0
Removed in version 1.35.0 (Gerrit change 577328)
Check if the user's name should be hidden. See User::isHidden().
Define function:
public static function onUserIsHidden( $user, &$hidden ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserIsHidden": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserIsHidden"
	}
}
Called from: File(s): User.php
Interface: UserIsHiddenHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:UserIsHidden extensions.


Details edit

  • $user: User in question.
  • &$hidden: Set true if the user's name should be hidden.

Notes edit

Added in MediaWiki 1.26 as part of the upcoming AuthManager system. Replaces the AuthPluginUser::isHidden() method call.

See also edit