From mediawiki.org
Jump to navigation Jump to search
Available from version 1.13
Before renaming an user
Define function:
public static function onRenameUserPreRename( $uid, $oldName, $newName ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"RenameUserPreRename": "MyExtensionHooks::onRenameUserPreRename"
Called from: File(s): Renameuser extension
Interface: RenameUserPreRenameHook.php

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


  • $uid: id of the user being renamed
  • $oldName: old name
  • $newName: new name