#5076 closed defect (bug) (fixed)
Group Admin UI autocomplete should exclude admin, mods..
Reported by: | imath | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.8 | Priority: | normal |
Severity: | normal | Version: | 1.8 |
Component: | Groups | Keywords: | has-patch |
Cc: |
Description
Once on the admin group edit screen, we can use the excellent autocomplete feature to add new members. The users that are already members are not shown, but i've noticed that as an admin of the group, my name was showing, so i can add myself a second time to the group. If i save, i have a message saying that imath was successfully added to the group.
The problem seems to be that the arguments that is waited by BP_Group_Member_Query is group_role and the one sent in bp_groups_admin_autocomplete_handler() is group_type. So as the default value for the argument group_role of BP_Group_Member_Query is array( 'member') it explains we cannot add a group member twice, but we can add a group mod, a group admin twice..
I suggest the diff to be sure an admin or a mod aren't added twice.
In 7242: