Extension:Renameuser/RenameUserWarning

From MediaWiki.org
Jump to navigation Jump to search
RenameUserWarning
Available from version 1.13
Get warnings when renaming an user
Define function:
public static function onRenameUserWarning( $oldName, $newName, &$warnings ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"RenameUserWarning": "MyExtensionHooks::onRenameUserWarning"
	}
}

For MediaWiki ≤1.25:

$wgHooks['RenameUserWarning'][] = 'MyExtensionHooks::onRenameUserWarning';
Called from: File(s): Renameuser extension

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)