Open main menu


< Extension:UserMerge
Available from version 1.19 (r89147)
trigger update actions somewhere else when an account is deleted by the UserMerge and Delete action
Define function:
public static function onDeleteAccount( &$deletedUser ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"DeleteAccount": "MyExtensionHooks::onDeleteAccount"

For MediaWiki ≤1.25:

$wgHooks['DeleteAccount'][] = 'MyExtensionHooks::onDeleteAccount';
Called from:File(s): UserMerge extension

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


  • &$deletedUser: user object of the deleted account

If the only action needed is to delete some table row based on user ID, UserMergeAccountDeleteTables can be used instead.