From mediawiki.org
Jump to navigation Jump to search
Available from version 1.19.0 (Gerrit change 89147)
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:
$wgHooks['DeleteAccount'][] = 'MyExtensionHooks::onDeleteAccount';
Called from:File(s): UserMerge / includes/MergeUser.php
Function(s): deleteUser

For more information about attaching hooks, see Manual:Hooks .
For examples of other 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.