Allow multiple votes from anonymous users on a shared IP address

Created on 1 March 2007, over 17 years ago
Updated 24 March 2023, over 1 year ago

Following up on:
voting api: http://drupal.org/node/59638
advpoll: http://drupal.org/node/105584

I have a use case where a client wants multiple people at a house party or other event to be able to vote through advpoll on a poll question. Likely this will be a shared IP situation, with either one computer or multiple computers through one NAT box. It is tedious to create a new user account for each of these voters. SO, we have a scenario where multiple anonymous votes per IP address (hostname) are desirable. Implications for integrity of the poll results are obviously, so this should be optional behavior.

Advpoll, in a poll where multiple options are ranked, enters each ranking as a separate vote using votingapi_set_vote, then later reassembles them based on UID or hostname into single ballots for counting purposes. So, I can't treat each row in the votingapi_vote table as a separate voter.

Do you have any thoughts on how to approach this? The "quickest" way to extend to this functionality seems to be appending a timestamp suffix (or something similar) to the IP address for the hostname column. Sorting by hostname could then be done as usual, except some IP addresses won't be regular IP addresses. It becomes more of a "unique identifier other than UID" column.

Right now neither votingapi_set_vote() or votingapi_add_vote() accept an incoming value for hostname. votingapi_add_vote() generates its own value. This is appropriate and good for most use cases, but not in mine.

Does it make sense to simply change voting_api_set_vote() and votingapi_add_vote() to accept an incoming value for hostname? Are there negative implications I might not be considering?

Thanks!

✨ Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States greenmachine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • @dieterholvoet opened merge request.
  • Status changed to Needs review over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

    I opened a MR and added the changes from the last patch. I renamed Anonymous vote restrictions (anonymous_vote_restrictions) to Anonymous vote differentiation (anonymous_differentiation) and added a third option, One vote per cookie, as suggested by @RumyanaRuseva in #7.

Production build 0.71.5 2024