[buddypress-trac] [BuddyPress Trac] #5705: bp_group_is_user_banned() doesn't reference the group loop's "is_banned" value properly

buddypress-trac noreply at wordpress.org
Sun Jun 15 20:00:53 UTC 2014


#5705: bp_group_is_user_banned()  doesn't reference the group loop's "is_banned"
value properly
-------------------------+---------------------
 Reporter:  r-a-y        |       Owner:  r-a-y
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  2.1
Component:  Groups       |     Version:  1.2
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |
-------------------------+---------------------
Changes (by r-a-y):

 * owner:   => r-a-y
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"8531"]:
 {{{
 #!CommitTicketReference repository="" revision="8531"
 Check groups loop data when using `bp_group_is_user_banned()`.

 Previously, `bp_group_is_user_banned() did not reference the data already
 queried in the groups loop via `BP_Groups_Group::get_group_extras()`.  As
 a
 result, if a user without the `'bp_moderate'` cap was logged in and
 viewing
 the group directory, this added twenty additional DB queries to the page.

 Commit also standardizes the return value of `bp_group_is_user_banned()`
 to
 a boolean.  Previously, it was possible for the function to return either
 a
 string of the integer, null or a boolean.

 Fixes #5705.
 }}}

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


More information about the buddypress-trac mailing list