Relocate delete_user action. Props filosofo. fixes #2956
git-svn-id: http://svn.automattic.com/wordpress/trunk@4020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ee691916c4
commit
0559786a79
|
@ -266,14 +266,14 @@ function wp_delete_user($id, $reassign = 'novalue') {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FINALLY, delete user
|
// FINALLY, delete user
|
||||||
|
do_action('delete_user', $id);
|
||||||
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->users WHERE ID = $id");
|
$wpdb->query("DELETE FROM $wpdb->users WHERE ID = $id");
|
||||||
$wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = '$id'");
|
$wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = '$id'");
|
||||||
|
|
||||||
wp_cache_delete($id, 'users');
|
wp_cache_delete($id, 'users');
|
||||||
wp_cache_delete($user->user_login, 'userlogins');
|
wp_cache_delete($user->user_login, 'userlogins');
|
||||||
|
|
||||||
do_action('delete_user', $id);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue