Changeset 45874
- Timestamp:
- 08/22/2019 01:52:16 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r45858 r45874 1666 1666 $user_activation_key = empty( $userdata['user_activation_key'] ) ? '' : $userdata['user_activation_key']; 1667 1667 1668 if ( isset( $userdata['spam'] ) && ! is_multisite() ) {1668 if ( ! empty( $userdata['spam'] ) && ! is_multisite() ) { 1669 1669 return new WP_Error( 'no_spam', __( 'Sorry, marking a user as spam is only supported on Multisite.' ) ); 1670 1670 } -
trunk/tests/phpunit/tests/user.php
r45859 r45874 576 576 577 577 /** 578 * @ticket 45747 579 */ 580 function test_wp_update_user_should_not_mark_user_as_spam_on_single_site() { 581 if ( is_multisite() ) { 582 $this->markTestSkipped( 'This test is intended for single site.' ); 583 } 584 585 $u = wp_update_user( 586 array( 587 'ID' => self::$contrib_id, 588 'spam' => '0', 589 ) 590 ); 591 592 $this->assertNotWPError( $u ); 593 594 $u = wp_update_user( 595 array( 596 'ID' => self::$contrib_id, 597 'spam' => '1', 598 ) 599 ); 600 601 $this->assertWPError( $u ); 602 $this->assertSame( 'no_spam', $u->get_error_code() ); 603 } 604 605 /** 578 606 * @ticket 28315 579 607 */
Note: See TracChangeset
for help on using the changeset viewer.