Anonymous votes in poll plugin


(Gerhard Schlager) #1

I’m in the process of fixing the import of polls in the phpBB3 importer. I noticed a few days ago that it was completely broken since October. :blush:

Anyway, in phpBB3 it is possible for anonymous users to vote in polls. Up until October I set the voters attribute of the poll and votes of each option manually, so I didn’t lose the original poll result. This isn’t possible anymore since the current version of the poll plugin recalculates all counts on each vote.

I was thinking about adding an anonymous_voters attribute to the custom field polls and save the count of anonymous votes for each option in the polls-votes field. These optional values could be used on every recalculation of the poll result if they exist. I have no intention to expose the anonymous vote feature to the user. It would be an internal thing, mostly in order to not lose votes during imports.

@zogstrip Would you accept a PR for that? Or should I discard anonymous votes and warn users during the import that they are going to lose data?


(Régis Hanol) #2

I definitely would :wink:


(Pad Pors) #3

can anonymous users vote in a poll now? I mean users that are not login to site.

the topic is quite old! sorry to bring it p, I couldn’t find any other related topic with 10 min search.


(Jeff Atwood) #4

No, anon users can’t do anything in Discourse.