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:
parent
4b729c6cba
commit
dd98e4f40f
|
@ -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');
|
||||||
|
|
Loading…
Reference in New Issue