Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2024 06:19:06 PM (11 months ago)
Author:
espellcaste
Message:

A user is no longer de-authenticated when making REST API requests.

We are introducing a new BP_LoggedIn_User class to fetch data about a BuddyPress logged-in user. This new addition fixes an issue where a user could be de-authenticated when making REST API requests.

Props dcavins, DJPaul, johnjamesjacoby, and imath.

Closes https://github.com/buddypress/buddypress/pull/395
See #9229 and #9145
Fixes #7658

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/xprofile/class-bp-xprofile-field.php

    r14026 r14070  
    232232
    233233        $old_user = get_current_user_id();
    234         self::set_current_user( $user );
     234        wp_set_current_user( $user );
    235235
    236236        $value = bp_get_profile_field_data(
     
    242242        $this->assertEmpty( $value );
    243243
    244         self::set_current_user( $old_user );
     244        wp_set_current_user( $old_user );
    245245    }
    246246
Note: See TracChangeset for help on using the changeset viewer.