Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/02/2026 07:10:26 PM (4 months ago)
Author:
espellcaste
Message:

Switch the function that updates the spam status of the member on multisite configs and deprecate bp_core_update_member_status.

Since WordPress 5.3, the user status is now updated using the globally available wp_update_user() function. So let us use it instead and deprecate bp_core_update_member_status().

It includes some minor Docblock changes.

Props imath.

Closes https://github.com/buddypress/buddypress/pull/434/
See #9173
Fixes #9167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/members/functions.php

    r14071 r14195  
    478478
    479479        // Bulk spam in network admin uses update_user_status
    480         bp_core_update_member_status( $u1, '1' );
     480        wp_update_user(
     481            array(
     482                'ID'   => $u1,
     483                'spam' => '1',
     484            )
     485        );
    481486
    482487        $this->assertTrue( bp_is_user_spammer( $u1 ) );
     
    509514
    510515        // Bulk unspam in network admin uses update_user_status
    511         bp_core_update_member_status( $u1, '0' );
     516        wp_update_user(
     517            array(
     518                'ID'   => $u1,
     519                'spam' => '0',
     520            )
     521        );
    512522
    513523        $this->assertFalse( bp_is_user_spammer( $u1 ) );
Note: See TracChangeset for help on using the changeset viewer.