[buddypress-trac] [BuddyPress] #4482: Better member type support in bp_group_has_members()

buddypress-trac noreply at wordpress.org
Mon Jun 3 17:12:55 UTC 2013


#4482: Better member type support in bp_group_has_members()
------------------------------+---------------------------
 Reporter:  boonebgorges      |       Owner:  boonebgorges
     Type:  enhancement       |      Status:  closed
 Priority:  high              |   Milestone:  1.8
Component:  Groups            |     Version:
 Severity:  major             |  Resolution:  fixed
 Keywords:  has-patch commit  |
------------------------------+---------------------------
Changes (by boonebgorges):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"7141"]:
 {{{
 #!CommitTicketReference repository="" revision="7141"
 Introduces BP_Group_Member_Query and refactors bp_group_has_members() to
 use it

 BP_Group_Member_Query extends BP_User_Query, which has a number of notable
 benefits:
 - Group member queries no longer JOIN against global user tables
 - Less code duplication, since general logic like 'exclude' is handled by
   BP_User_Query
 - Future access to the additional parameters of BP_User_Query, such as
 'type'

 Using the new BP_Group_Member_Query, this changeset also changes the way
 that
 group member queries filter by group roles (member, mod, admin). The new
 group_role parameter in the bp_group_has_members() stack accepts an array
 of
 group roles. The legacy argument 'exclude_admins_mods' is still accepted,
 and
 translates to 'group_role' => array( 'member' ) when true. These
 group_role
 enhancements will allow for future enhancements in the Groups Admin
 section of
 the Dashboard, and other places where it might be useful to query for the
 members of a group matching a specific role. See #4977.

 Fixes #4482

 Props trishasalas for early patches and feedback. Props johnjamesjacoby
 for
 review.
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4482#comment:19>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list