Posted by paul2 on February 8, 2012 at 12:19am
3 followers
Jump to:
| Project: | Organic groups |
| Version: | 7.x-2.x-dev |
| Component: | og.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
og_get_user_roles() fails to match the desired gid to the og_user_roles table's gid field. So if a user is an "admin" of group A, but not an admin of group B, if you query their roles on group B (assuming they are a member of group B) it will incorrectly report they are an admin of group B, simply because that function hasn't bothered to filter the result set by gid.
I think all that needs to be done to fix this is add ->condition('ogur.gid', $gid, '=') to the $query object in og_get_user_roles().
Comments
#1
Thanks, committed.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.