#5072 closed defect (bug) (fixed)
BP_Group_Member_Query assumes all members confirmed
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 1.8 | Priority: | normal |
Severity: | normal | Version: | 1.8 |
Component: | Groups | Keywords: | has-patch |
Cc: |
Description
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.
Thanks for the report, Mike_Cowobo.
You bring up good points regarding both options. I'll let Boone chime in here since he wrote the BP_Group_Member_Query class.