In advpoll.module, in function advpoll_electoral_list_form_submit($form, &$form_state); down towards the bottom where it is NOT an authenticate user role, there is some bad SQL.

// Insert new users into the electoral_list based on the role chosen.
$result = db_query("INSERT INTO {advpoll_electoral_list} (nid, uid) SELECT '%d', u.uid FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid WHERE ur.rid = %d AND u.uid NOT IN('%s')", $form_state['values']['nid'], $add_role, $user_in_string);

The last bits "AND u.uid NOT IN('%s')", where the %s is quoted. That produces a string and it won't match IDs and it should not be. I changed this to "AND u.uid NOT IN(%s)" and it works like a champ!

Comments

gobinathm’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

D6 is EOL hence this issue won't be fixed (or) attended. So closing it.