mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-24 01:57:53 +01:00
Delete user's usermeta when deleting the user.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1a44970d3a
commit
fbaf9428a0
@ -238,6 +238,7 @@ function wp_delete_user($id, $reassign = 'novalue') {
|
||||
|
||||
// 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, 'users');
|
||||
|
Loading…
Reference in New Issue
Block a user