[buddypress-trac] [BuddyPress] #5072: BP_Group_Member_Query assumes all members confirmed
buddypress-trac
noreply at wordpress.org
Mon Jun 24 12:03:26 UTC 2013
#5072: BP_Group_Member_Query assumes all members confirmed
--------------------------+-----------------------------
Reporter: Mike_Cowobo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Groups | Version:
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
BP_Group_Member_Query doesn't take confirmed / unconfirmed status into
account, ie. unconfirmed (invited or membership-requesting) users are
listed as members in the group member list.
I see two solutions:
1) Add is_confirmed to the query vars, default to true.
2) Add unconfirmed as a possible role (with member, mod, admin).
Option (2) is elegant as querying based on user role is what the class is
all about, however, it will add more clutter to the code, because the
is_{$role} syntax doesn't fly here. Besides, confirmed/unconfirmed is more
of a status than a role.
Option (1) is appealing, because it entails hardly 2 lines of code and is
quite clear. However, it makes it possible to make strange queries like
role=admin&is_confirmed=0.
For something that will most likely be hardly ever be used in a non-
default way, I would think option 1 is the most straight-forward solution.
I have attached a patch that implements this.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5072>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list