mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
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:
parent
e641c48a72
commit
53e6ba7959
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user