[buddypress-trac] [BuddyPress Trac] #7078: Groups: Replace `BP_Group_Member` static method DB queries with updated group membership functions

buddypress-trac noreply at wordpress.org
Sat May 21 18:21:15 UTC 2016


#7078: Groups: Replace `BP_Group_Member` static method DB queries with updated
group membership functions
--------------------------------+-----------------------
 Reporter:  r-a-y               |      Owner:
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  2.6
Component:  Component - Groups  |    Version:
 Severity:  normal              |   Keywords:  has-patch
--------------------------------+-----------------------
 Addendum to #6327.

 This patch replaces all `BP_Group_Member` static methods relying on DB
 queries with the new group membership cached versions available from
 #6327.

 Patch also fixes up `groups_check_user_has_invite()` and
 `groups_check_for_membership_request()` to use the new
 `bp_get_user_groups() function.

 This saves up to 6 queries on single group pages.

 One thing that this patch changes though is the return value of null
 values in the `BP_Group_Member` static methods.  Failures now return
 integer 0 instead.

 Patch passes all existing unit tests.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7078>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list