Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/28/2016 09:17:35 PM (10 years ago)
Author:
r-a-y
Message:

Replace group membership static DB method calls with group membership functions.

Our group membership functions now have better caching logic due to #6327
and #7078.

This commit switches all our older group membership static DB method calls
with these group membership functions so sites enabled with an object cache
can benefit from these improvements.

Props r-a-y, boonebgorges, dcavins.

Fixes #7078.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-group.php

    r10794 r10820  
    246246            // Set user-specific data.
    247247            $user_id          = bp_loggedin_user_id();
    248             $this->is_member  = BP_Groups_Member::check_is_member( $user_id, $this->id );
    249             $this->is_invited = BP_Groups_Member::check_has_invite( $user_id, $this->id );
    250             $this->is_pending = BP_Groups_Member::check_for_membership_request( $user_id, $this->id );
     248            $this->is_member  = groups_is_user_member( $user_id, $this->id );
     249            $this->is_invited = groups_check_user_has_invite( $user_id, $this->id );
     250            $this->is_pending = groups_check_for_membership_request( $user_id, $this->id );
    251251
    252252            // If this is a private or hidden group, does the current user have access?
Note: See TracChangeset for help on using the changeset viewer.