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:
ryan 2005-12-05 05:17:28 +00:00
parent 1a44970d3a
commit fbaf9428a0

View File

@ -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');