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: https://develop.svn.wordpress.org/trunk@20523 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave 2012-04-18 21:24:53 +00:00
parent c0dd73f68d
commit e8a29e70d6
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);