WordPress.org

Make WordPress Core

Ticket #24771: 24771.diff

File 24771.diff, 712 bytes (added by westi, 8 years ago)

Fix

  • user.php

     
    9595                        return new WP_Error( 'spammer_account', __( '<strong>ERROR</strong>: Your account has been marked as a spammer.' ) );
    9696
    9797                // Is a user's blog marked as spam?
    98                 if ( !is_super_admin( $user->ID ) && isset( $user->primary_blog ) ) {
     98                if ( !is_super_admin( $user->ID ) && isset( $user->primary_blog ) && is_user_member_of_blog( $user->ID, $user->primary_blog ) ) {
    9999                        $details = get_blog_details( $user->primary_blog );
    100100                        if ( is_object( $details ) && $details->spam == 1 )
    101101                                return new WP_Error( 'blog_suspended', __( 'Site Suspended.' ) );