Manual:Hooks/UserGetReservedNames

From MediaWiki.org
Jump to navigation Jump to search
UserGetReservedNames
Available from version 1.14.0
Allows to modify $wgReservedUsernamesManual:$wgReservedUsernames at run time.
Define function:
public static function onUserGetReservedNames( &$reservedUsernames ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UserGetReservedNames": "MyExtensionHooks::onUserGetReservedNames"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UserGetReservedNames'][] = 'MyExtensionHooks::onUserGetReservedNames';
Called from:File(s): User.php

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

Details[edit]