delete_user
delete_user is an action that is fired after a user has been deleted. Their user ID (which is now does not exist anywhere in WP) is passed as the only parameter. Useful for setups where WP users are integrated with users in a BBS or some other authentication system.
Context:
File: wp-admin/admin-db.php
// FINALLY, delete user
$wpdb->query("DELETE FROM $wpdb->users WHERE ID = $id");
$wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = '$id'");
wp_cache_delete($id, 'users');
wp_cache_delete($user->user_login, 'userlogins');
do_action('delete_user', $id);
return true;
This hook is an action which means that it primarily acts as an event trigger, instead of a content filter. This is a semantic difference, but it will help you to remember what this hook does if you use it like this: add_action('delete_user', 'your_function');
This hook was introduced in WordPress 2.0, and will not work in earlier versions.