WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/22/2019 01:52:16 AM (8 weeks ago)
Author:
SergeyBiryukov
Message:

Users: Adjust [45708] to make sure wp_update_user() does not issue a WP_Error if a single site was previously set up as Multisite and there's still a spam field in the user table.

Add a unit test.

Props azaozz, SergeyBiryukov.
Fixes #45747.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r45858 r45874  
    16661666    $user_activation_key = empty( $userdata['user_activation_key'] ) ? '' : $userdata['user_activation_key'];
    16671667
    1668     if ( isset( $userdata['spam'] ) && ! is_multisite() ) {
     1668    if ( ! empty( $userdata['spam'] ) && ! is_multisite() ) {
    16691669        return new WP_Error( 'no_spam', __( 'Sorry, marking a user as spam is only supported on Multisite.' ) );
    16701670    }
Note: See TracChangeset for help on using the changeset viewer.