Changeset 59562
- Timestamp:
- 12/26/2024 11:55:05 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-functions.php
r59561 r59562 72 72 } 73 73 74 if ( ( ! is_object( $primary ) ) || ( 1 == $primary->archived || 1 == $primary->spam || 1 == $primary->deleted ) ) { 74 if ( ( ! is_object( $primary ) ) 75 || ( '1' === $primary->archived || '1' === $primary->spam || '1' === $primary->deleted ) 76 ) { 75 77 $blogs = get_blogs_of_user( $user_id, true ); // If a user's primary blog is shut down, check their other blogs. 76 78 $ret = false; 77 79 if ( is_array( $blogs ) && count( $blogs ) > 0 ) { 78 80 foreach ( (array) $blogs as $blog_id => $blog ) { 79 if ( get_current_network_id() != $blog->site_id ) {81 if ( get_current_network_id() !== $blog->site_id ) { 80 82 continue; 81 83 } 84 82 85 $details = get_site( $blog_id ); 83 if ( is_object( $details ) && 0 == $details->archived && 0 == $details->spam && 0 == $details->deleted ) { 86 if ( is_object( $details ) 87 && '0' === $details->archived && '0' === $details->spam && '0' === $details->deleted 88 ) { 84 89 $ret = $details; 85 if ( get_user_meta( $user_id, 'primary_blog', true ) != $blog_id ) {90 if ( (int) get_user_meta( $user_id, 'primary_blog', true ) !== $blog_id ) { 86 91 update_user_meta( $user_id, 'primary_blog', $blog_id ); 87 92 }
Note: See TracChangeset
for help on using the changeset viewer.