[buddypress-trac] [BuddyPress Trac] #7658: User is de-authenticated when making REST API request

buddypress-trac noreply at wordpress.org
Wed Jun 5 17:53:28 UTC 2024


#7658: User is de-authenticated when making REST API request
--------------------------+---------------------
 Reporter:  dcavins       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  14.0.0
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+---------------------

Comment (by imath):

 @dcavins thanks for updating the patch, I think there's something wrong
 with 2 unit tests:

 1. BP_Tests_BP_Groups_Group_TestCases::test_is_member_property
 2. BP_Tests_BP_Groups_Group_TestCases::test_is_invited_property

 Both are using `wp_set_current_user( $users[1] );`

 I've tried to look at the first one, and if I dump `$users[1]`, it's not
 the same user ID than `bp_loggedin_user_id()`. It looks like
 `bp_loggedin_user_id()` is not updated if `wp_set_current_user();` is
 used.

 So I doubt unlike what you wrote earlier, these tests should fail. Could
 you have a look at it?

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7658#comment:16>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list