Extension:Renameuser/RenameUserPreRename

RenameUserPreRename
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.

DetailsEdit

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