clean_user_cache() after the DELETE query in wp_delete_user(). See #20460.

This is to prevent plugins managing to hook in between the cache cleaning and the actual deletion.


git-svn-id: http://svn.automattic.com/wordpress/trunk@20523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
duck_ 2012-04-18 21:24:53 +00:00
parent e641c48a72
commit 53e6ba7959
1 changed files with 2 additions and 2 deletions

View File

@ -263,8 +263,6 @@ function wp_delete_user( $id, $reassign = 'novalue' ) {
$wpdb->update( $wpdb->links, array('link_owner' => $reassign), array('link_owner' => $id) );
}
clean_user_cache( $user );
// FINALLY, delete user
if ( !is_multisite() ) {
$wpdb->delete( $wpdb->usermeta, array( 'user_id' => $id ) );
@ -274,6 +272,8 @@ function wp_delete_user( $id, $reassign = 'novalue' ) {
$wpdb->delete( $wpdb->usermeta, array( 'user_id' => $id , 'meta_key' => $level_key ) );
}
clean_user_cache( $user );
// allow for commit transaction
do_action('deleted_user', $id);