diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php index cc797a7bd0..ebc699436d 100644 --- a/src/wp-includes/ms-functions.php +++ b/src/wp-includes/ms-functions.php @@ -76,12 +76,12 @@ function get_active_blog_for_user( $user_id ) { } $details = get_site( $blog_id ); if ( is_object( $details ) && $details->archived == 0 && $details->spam == 0 && $details->deleted == 0 ) { - $ret = $blog; + $ret = $details; if ( get_user_meta( $user_id, 'primary_blog', true ) != $blog_id ) { update_user_meta( $user_id, 'primary_blog', $blog_id ); } if ( ! get_user_meta( $user_id, 'source_domain', true ) ) { - update_user_meta( $user_id, 'source_domain', $blog->domain ); + update_user_meta( $user_id, 'source_domain', $details->domain ); } break; }