Closed (outdated)
Project:
Advanced Poll
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2009 at 20:24 UTC
Updated:
9 Mar 2017 at 20:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aasarava commentedI'm looking into changing the message, too. It seems that the message is output via Drupal's Forms API, so you could theoretically use hook_form_alter() to modify $form['message']. (I haven't tried it yet.)
That said, I took a closer look at the code in binary.inc, for the binary poll, and think there might be a bug. On line 120, the code uses the isset() function to check if $user->uid is set. But this will evaluate to true even if there's an anonymous user viewing the site -- which is why we're seeing the "not eligible" message.
Anonymous users should see the "log in" message by default. The "not eligible" message should only be shown to logged-in users who are not in an election group (for polls that have it set).
So, it seems like the fix is to stop using the isset() function and just check if $user->uid is greater than 0. Here's the fix:
Can any of the module co-maintainers confirm this?
Comment #2
dddave commentedComment #3
smokris@aasarava: agreed. Ran into the same issue today.
Patch attached.
Comment #4
gobinathmD6 is EOL hence this issue won't be fixed (or) attended. So closing it.