Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2024 06:19:06 PM (5 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/core/template/bpUserHasAccess.php

    r13980 r14070  
    2222
    2323        $this->grant_bp_moderate( $users[0] );
    24         self::set_current_user( $users[0] );
     24        wp_set_current_user( $users[0] );
    2525        $this->set_permalink_structure( '/%postname%/' );
    2626
     
    3333        $users = self::factory()->user->create_many( 2 );
    3434
    35         self::set_current_user( $users[0] );
     35        wp_set_current_user( $users[0] );
    3636        $this->set_permalink_structure( '/%postname%/' );
    3737
     
    4444        $users = self::factory()->user->create_many( 2 );
    4545
    46         self::set_current_user( $users[0] );
     46        wp_set_current_user( $users[0] );
    4747        $this->set_permalink_structure( '/%postname%/' );
    4848
Note: See TracChangeset for help on using the changeset viewer.