Manual:Hooks/UserGetReservedNames

From Linux Web Expert

UserGetReservedNames
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Allows to modify $wgReservedUsernames at run time.
<translate> Define function:</translate>
public static function onUserGetReservedNames( &$reservedUsernames ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"UserGetReservedNames": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserGetReservedNames"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> User.php
<translate> Interface:</translate> UserGetReservedNamesHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:UserGetReservedNames extensions</tvar>.</translate>

Details