Jump to content

Manual:Hooks/UserGetReservedNames

From mediawiki.org
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
UserGetReservedNames
Available from version 1.14.0
Allows to modify $wgReservedUsernames at run time.
Define function:
public static function onUserGetReservedNames( &$reservedUsernames ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserGetReservedNames": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserGetReservedNames"
	}
}
Called from: File(s): User.php
Interface: UserGetReservedNamesHook.php

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

Details