Manual:Hooks/RenameUserWarning
(Redirected from Extension:Renameuser/Hooks/RenameUserWarning)
RenameUserWarning | |
---|---|
Available from version 1.40.0 Get warnings when renaming an user | |
Define function: | public static function onRenameUserWarning( $oldName, $newName, &$warnings ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"RenameUserWarning": "MediaWiki\\Extension\\MyExtension\\Hooks::onRenameUserWarning"
}
}
|
Called from: | File(s): specials/SpecialRenameUser.php Function(s): execute |
Interface: | RenameUserWarningHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:RenameUserWarning extensions.
Details
edit- $oldName: old name
- $newName: new name
- &$warnings: array of warning (messages names, may be with parameters)