Make WordPress Core


Ignore:
Timestamp:
10/21/2025 03:23:43 PM (3 months ago)
Author:
jorbin
Message:

Users: Revert Lazy load user capabilities in WP_User object.

The change from public to protected broke tests for extenders and this also broke WP_User::to_array().

Reverts [60915].

Props davidbaumwald, ellatrix, timothyblynjacobs, welcher, spacedmonkey, bradshawtm, peterwilsoncc, jorbin.
See #58001.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/multisite.php

    r60977 r61037  
    370370        switch_to_blog( $site_id );
    371371        $user = get_user_by( 'id', $user_id );
    372         $this->assertContains( 'subscriber', $user->roles, 'User should have subscriber role' );
    373372        restore_current_blog();
    374373
     
    376375        wpmu_delete_user( $user_id );
    377376
    378         $this->assertContains( 'subscriber', $user->roles, 'User should still have subscriber role' );
     377        $this->assertContains( 'subscriber', $user->roles );
    379378    }
    380379
Note: See TracChangeset for help on using the changeset viewer.