WordPress.org

Make WordPress Core

Ticket #11254: small_patch.diff

File small_patch.diff, 1.2 KB (added by cronco, 4 years ago)
  • wp-includes/user.php

     
    12821282        wp_cache_delete($user->user_email, 'useremail'); 
    12831283        wp_cache_delete($user->user_nicename, 'userslugs'); 
    12841284        wp_cache_delete('blogs_of_user-' . $id, 'users'); 
     1285        $GLOBALS['current_user'] = new WP_User($id); 
    12851286} 
    12861287 
    12871288/** 
  • wp-includes/deprecated.php

     
    22962296        else 
    22972297                $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); 
    22982298 
     2299        wp_cache_delete( $user_id, 'user_meta' ); 
    22992300        clean_user_cache( $user_id ); 
    2300         wp_cache_delete( $user_id, 'user_meta' ); 
    23012301 
    23022302        if ( $cur && $cur->umeta_id ) 
    23032303                do_action( 'deleted_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); 
     
    24042404        else 
    24052405                return false; 
    24062406 
     2407        wp_cache_delete( $user_id, 'user_meta' ); 
    24072408        clean_user_cache( $user_id ); 
    2408         wp_cache_delete( $user_id, 'user_meta' ); 
    24092409 
    24102410        if ( !$cur ) 
    24112411                do_action( 'added_usermeta', $wpdb->insert_id, $user_id, $meta_key, $meta_value );