Version:
Drupal 6.0 HEAD snapshot updated: June 5, 2007 - 17:03
Steps to reproduce:
- Apply 'Role A' and 'Role B' to a user
- Filter by 'Role A'
- Refine by 'Role B'
Result:
No users in the user list.
Expected Result:
The user with both 'Role A' and 'Role B' in the user list.
Fix?
I tried a few variations of the SQL statement causing the problem (user.module 2157), but I couldn't find a query that would grab both roles and return that user. Good luck :)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | role_refinery-149688-3.patch | 1.43 KB | chx |
| #2 | role_refinery-149688-2.patch | 4.72 KB | chx |
Comments
Comment #1
fwalch commentedHere's an example for a SQL statement that works:
SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM users u LEFT JOIN users_roles ur ON u.uid = ur.uid WHERE u.uid != 0 AND ur.rid = 4 AND ur.uid IN (SELECT uid FROM users_roles WHERE rid=5) ORDER BY u.created DESC LIMIT 0, 50However, I'm not sure if this is really the easiest query possible.
Comment #2
chx commentedJust multiply the ur table by itself as many times as it is needed.
Comment #3
chx commentedDebug...
Comment #4
jonathan_hunt commentedThis issue occurs on 5.7 also
Comment #5
jonathan_hunt commentedThe following code fixes it for me on 5.7
Comment #6
dpearcefl commentedDoes this issue exist in current D6?
Comment #7
dpearcefl commentedWe want your patch if it is still needed. Please resubmit it with a proper filename.
http://drupal.org/node/1054616
[description]-[issue-number]-[comment-number].patch