e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 213 forks source link

Poll doesn't remember that I've voted #376

Closed MattConlon closed 11 years ago

MattConlon commented 11 years ago

There's a poll on the site, which you can vote for, and when you vote, you see the results. However, it doesn't remember you when you move from page to page. You get to keep voting, with each new page refresh.

Moc commented 11 years ago

Additional info, Vote storage method is set to 'cookie' (/e107_plugins/poll/admin_config.php) Changing it to User ID should help. Having said that, there may be a bug in the cookie storage process.

arunshekher commented 11 years ago

This has been true for me as well from v2.0 alpha till date when vote storage method used is cookie. Can't see a cookie starting with the keyword 'poll_' being set for the domain. Using FF 21.0 and Chrome 27.0.1453.94 m on Win 7.

Moc commented 11 years ago

Fixed, thanks for the tip @arunshekher. Cookie is now created properly.

Note that relying on cookies for remembering poll voting is not the safest option as users can just clear their browser cookies and vote again, and again, and again :) I'd recommend using the 'User ID' vote storage method. This however does not allow for 'guests' (not registered member) voting.