Available from version ???
Called on Special:Renameuser before a user is renamed. Will show the given warnings to the user and ask for a confirmation.
Define function:
public static function onRenameUserWarning( Title $oldUsername, Title $newUsername, array &$warnings ) { ... }
Attach hook:
$wgHooks['RenameUserWarning'][] = 'MyExtensionHooks::onRenameUserWarning';
Called from:File(s): Renameuser / includes/SpecialRenameuser.php
Function(s): execute

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


  • $oldUsername: An instance of Title, representing the old username
  • $newUsername: An instance of Title, representing the new username
  • &$warnings: An array with 1 or more message keys, and 1 or more parameters for the warnings to be shown