mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 21:24:35 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@45874 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1665,7 +1665,7 @@ function wp_insert_user( $userdata ) {
|
||||
|
||||
$user_activation_key = empty( $userdata['user_activation_key'] ) ? '' : $userdata['user_activation_key'];
|
||||
|
||||
if ( isset( $userdata['spam'] ) && ! is_multisite() ) {
|
||||
if ( ! empty( $userdata['spam'] ) && ! is_multisite() ) {
|
||||
return new WP_Error( 'no_spam', __( 'Sorry, marking a user as spam is only supported on Multisite.' ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user