Jump to content

Manual:Hooks/RenameUserAbort

From mediawiki.org
RenameUserAbort
Available from version 1.40.0
Allow other extensions to abort a user rename
Define function:
public static function onRenameUserAbort( $uid, $oldName, $newName ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"RenameUserAbort": "MediaWiki\\Extension\\MyExtension\\Hooks::onRenameUserAbort"
	}
}
Called from: File(s): specials/SpecialRenameUser.php
Function(s): execute
Interface: RenameUserAbortHook.php

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

Details

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