WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/25/2016 05:48:22 AM (3 years ago)
Author:
jeremyfelt
Message:

Multisite: Replace get_blog_details() in add_user_to_blog() with get_site().

Adds tests for add_user_to_blog().

Props flixos90.
Fixes #38356.

File:
1 edited

Legend:

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

    r38814 r38903  
    162162    if ( !get_user_meta($user_id, 'primary_blog', true) ) {
    163163        update_user_meta($user_id, 'primary_blog', $blog_id);
    164         $details = get_blog_details($blog_id);
    165         update_user_meta($user_id, 'source_domain', $details->domain);
     164        $site = get_site( $blog_id );
     165        update_user_meta( $user_id, 'source_domain', $site->domain );
    166166    }
    167167
Note: See TracChangeset for help on using the changeset viewer.