Manual:Hooks/UserIsHidden

From MediaWiki.org
Jump to navigation Jump to search
UserIsHidden
Available from version 1.26.0
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": "MyExtensionHooks::onUserIsHidden"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UserIsHidden'][] = 'MyExtensionHooks::onUserIsHidden';
Called from: File(s): User.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.26MediaWiki 1.26 as part of the upcoming AuthManager system. Replaces the AuthPluginUser::isHidden() method call.

See also[edit]