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

Adds tests for `add_user_to_blog()`.

Props flixos90.
Fixes #38356.

Built from https://develop.svn.wordpress.org/trunk@38903


git-svn-id: http://core.svn.wordpress.org/trunk@38846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2016-10-25 05:49:29 +00:00
parent 749b480de0
commit 390dc4b345
2 changed files with 3 additions and 3 deletions

View File

@ -161,8 +161,8 @@ function add_user_to_blog( $blog_id, $user_id, $role ) {
if ( !get_user_meta($user_id, 'primary_blog', true) ) {
update_user_meta($user_id, 'primary_blog', $blog_id);
$details = get_blog_details($blog_id);
update_user_meta($user_id, 'source_domain', $details->domain);
$site = get_site( $blog_id );
update_user_meta( $user_id, 'source_domain', $site->domain );
}
$user->set_role($role);

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38902';
$wp_version = '4.7-alpha-38903';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.