Make WordPress Core


Ignore:
Timestamp:
08/01/2019 05:48:31 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Users: Use clean_user_cache() in wp_insert_user(), wp_update_user(), wp_set_password(), add_user_to_blog().

Props spacedmonkey.
Fixes #47021.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r45714 r45715  
    18541854        $user->set_role( get_option( 'default_role' ) );
    18551855    }
    1856     wp_cache_delete( $user_id, 'users' );
    1857     wp_cache_delete( $user_login, 'userlogins' );
     1856
     1857    clean_user_cache( $user_id );
    18581858
    18591859    if ( $update ) {
     
    19811981    }
    19821982
    1983     wp_cache_delete( $user['user_email'], 'useremail' );
    1984     wp_cache_delete( $user['user_nicename'], 'userslugs' );
     1983    clean_user_cache( $user_obj );
    19851984
    19861985    // Merge old and new fields with new fields overwriting old ones.
Note: See TracChangeset for help on using the changeset viewer.