Create user object. Props mark8barnes. fixes #9309 for 2.7

git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-03-10 18:38:35 +00:00
parent 4b701a0713
commit 1f31649051

View File

@ -393,6 +393,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');