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

git-svn-id: http://svn.automattic.com/wordpress/trunk@10760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-03-10 18:37:53 +00:00
parent 4b729c6cba
commit dd98e4f40f
1 changed files with 2 additions and 0 deletions

View File

@ -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->users WHERE ID = %d", $id) );
$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_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($id, 'users');
wp_cache_delete($user->user_login, 'userlogins'); wp_cache_delete($user->user_login, 'userlogins');
wp_cache_delete($user->user_email, 'useremail'); wp_cache_delete($user->user_email, 'useremail');