Make WordPress Core

Changeset 18791


Ignore:
Timestamp:
09/27/2011 07:36:36 AM (13 years ago)
Author:
nacin
Message:

Ensure we have a full blog object in get_active_blog_for_user(). fixes #18789.

File:
1 edited

Legend:

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

    r18768 r18791  
    8282        if ( ! isset( $blogs[ $primary_blog ] ) ) {
    8383            update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id );
    84             $primary = $first_blog;
     84            $primary = get_blog_details( $first_blog->userblog_id );
    8585        } else {
    8686            $primary = get_blog_details( $primary_blog );
     
    9393    }
    9494
    95     if ( ( ! is_object( $primary ) ) || ( is_object( $primary ) && $primary->archived == 1 || $primary->spam == 1 || $primary->deleted == 1 ) ) {
     95    if ( ( ! is_object( $primary ) ) || ( $primary->archived == 1 || $primary->spam == 1 || $primary->deleted == 1 ) ) {
    9696        $blogs = get_blogs_of_user( $user_id, true ); // if a user's primary blog is shut down, check their other blogs.
    9797        $ret = false;
Note: See TracChangeset for help on using the changeset viewer.