Available from version ??? (Gerrit change 160846)
define database tables to automatically delete records from when a user is deleted
Define function:
public static function onUserMergeAccountDeleteTables( &$tablesToDelete ) { ... }
Attach hook:
$wgHooks['UserMergeAccountDeleteTables'][] = 'MyExtensionHooks::onUserMergeAccountDeleteTables';
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:UserMergeAccountDeleteTables extensions.


  • &$tablesToDelete: an associative array of table_name => user_id_field key/value pairs. (Alternatively, the value can be in the form array( user_id_field, 'db' => $db ) if a custom Database object is needed.) Rows matching the user ID will be deleted from the table.

If the delete operation is too complex to be handled this way, DeleteAccount can be used instead.