Ticket #38355: 38355.diff
File 38355.diff, 1.1 KB (added by , 9 years ago) |
---|
-
wp-includes/ms-functions.php
53 53 if ( false !== $primary_blog ) { 54 54 if ( ! isset( $blogs[ $primary_blog ] ) ) { 55 55 update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id ); 56 $primary = get_ blog_details( $first_blog->userblog_id );56 $primary = get_site( $first_blog->userblog_id ); 57 57 } else { 58 $primary = get_ blog_details( $primary_blog );58 $primary = get_site( $primary_blog ); 59 59 } 60 60 } else { 61 61 //TODO Review this call to add_user_to_blog too - to get here the user must have a role on this blog? … … 71 71 foreach ( (array) $blogs as $blog_id => $blog ) { 72 72 if ( $blog->site_id != $wpdb->siteid ) 73 73 continue; 74 $details = get_ blog_details( $blog_id );74 $details = get_site( $blog_id ); 75 75 if ( is_object( $details ) && $details->archived == 0 && $details->spam == 0 && $details->deleted == 0 ) { 76 76 $ret = $blog; 77 77 if ( get_user_meta( $user_id , 'primary_blog', true ) != $blog_id )