Filtering by role doesn't select correct data.
earnie - June 29, 2009 - 12:50
| Project: | Advanced User |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Any time you filter by role you get an unexpected list.

#1
I can confirm this. It seems to work when the role EQ is selected but not when the role NE is selected. Great idea and much needed module. Hope you get it working.
Phil
#2
Subscribe, have exactly the same problem. Sorry, on D5
I understand all of this is a lot of work, but why not start selling subscriptions to updates of your module. You would make money and alot of people would not be so frustrated anymore. E-commerce or Ubercart allow it all to be done automatically. Why is this market not functioning?
Theo Richel
I am trying to select the users who have not donated to my site. The role option doesnt work, but others (payment smaller than some date, payment smaller than some amount) are dysfunctional as well.
So I gave the users I do *not* want to select a special permission and selected for users who do NOT CONTAIN or are NOPT EQUIVALENT that permission. Then I get an error message:
user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT ur.uid FROM GRK_users_roles ur WHERE ur.rid NOT IN (SELE query: SELECT COUNT(DISTINCT u.uid) FROM GRK_users u LEFT JOIN GRK_users_roles ur ON u.uid = ur.uid LEFT JOIN GRK_profile_values profile_vrnm ON profile_vrnm.fid = 2 AND profile_vrnm.uid = u.uid LEFT JOIN GRK_profile_values profile_achtrnm ON profile_achtrnm.fid = 3 AND profile_achtrnm.uid = u.uid LEFT JOIN GRK_profile_values profile_pstadr ON profile_pstadr.fid = 4 AND profile_pstadr.uid = u.uid LEFT JOIN GRK_profile_values profile_pstco ON profile_pstco.fid = 5 AND profile_pstco.uid = u.uid LEFT JOIN GRK_profile_values profile_plts ON profile_plts.fid = 6 AND profile_plts.uid = u.uid LEFT JOIN GRK_profile_values profile_cntry ON profile_cntry.fid = 7 AND profile_cntry.uid = u.uid LEFT JOIN GRK_profile_values profile_datum1 ON profile_datum1.fid = 18 AND profile_datum1.uid = u.uid LEFT JOIN GRK_profile_values profile_bedrag1 ON profile_bedrag1.fid = 19 AND profile_bedrag1.uid = u.uid LEFT JOIN GRK_profile_values profile_reknr ON profile_reknr.fid = 30 AND profile_reknr.uid = u.uid LEFT JOIN GRK_profile_values profile_boekje ON profile_boekje.fid = 23 AND profile_boekje.uid = u.uid LEFT JOIN GRK_profile_values profile_bio ON profile_bio.fid = 16 AND profile_bio.uid = u.uid WHERE u.uid != 0 AND ( ((u.uid NOT IN (SELECT ur.uid FROM GRK_users_roles ur WHERE ur.rid NOT IN (SELECT p.rid FROM GRK_permission p WHERE p.perm != 'make backups'))) AND u.uid != 1)) in /home/www/klimatosoof/includes/database.mysql.inc on line 174.
If I do the same selection but then with EQ instead of NE to look after a permission I get the same error message.
I have the impression that when you once select to search in user roles it stays in that modus.