From dd98e4f40ff6682a79f573e2685cbbaf7f5d83f3 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 10 Mar 2009 18:37:53 +0000 Subject: [PATCH] Create user object. Props mark8barnes. fixes #9309 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@10760 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/user.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index ab4d8594eb..525d47bfd8 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -434,6 +434,8 @@ function wp_delete_user($id, $reassign = 'novalue') { $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->users WHERE ID = %d", $id) ); $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d", $id) ); + $user = new WP_User($id); + wp_cache_delete($id, 'users'); wp_cache_delete($user->user_login, 'userlogins'); wp_cache_delete($user->user_email, 'useremail');