File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -71,18 +71,23 @@ function get_active_blog_for_user( $user_id ) {
7171 }
7272 }
7373
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+ ) {
7577 $ blogs = get_blogs_of_user ( $ user_id , true ); // If a user's primary blog is shut down, check their other blogs.
7678 $ ret = false ;
7779 if ( is_array ( $ blogs ) && count ( $ blogs ) > 0 ) {
7880 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 ) {
8082 continue ;
8183 }
84+
8285 $ 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+ ) {
8489 $ 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 ) {
8691 update_user_meta ( $ user_id , 'primary_blog ' , $ blog_id );
8792 }
8893 if ( ! get_user_meta ( $ user_id , 'source_domain ' , true ) ) {
You can’t perform that action at this time.
0 commit comments