Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2024 06:19:06 PM (22 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/src/bp-groups/classes/class-bp-groups-group.php

    r13987 r14070  
    125125         *
    126126         * @since 1.2.0
    127          * @var bool
     127         * @var int|bool
    128128         */
    129129        protected $is_member;
     
    621621         * @since 2.7.0
    622622         *
    623          * @return bool|int
     623         * @return bool|int ID of the membership if the user is member, otherwise false.
    624624         */
    625625        protected function get_is_member() {
     
    629629
    630630                $this->is_member = groups_is_user_member( bp_loggedin_user_id(), $this->id );
     631
    631632                return $this->is_member;
    632633        }
Note: See TracChangeset for help on using the changeset viewer.