Allow more than one registered user vote from same machine

maverick
maverick
  • maverick
  • 14 months ago
Hi All,

Here is a small hack that will help you allowing more that one registered user voting from the same machine. This method uses only user name to validate the user voting.

Find the below code at line 668 in components/com_communitypolls/models/polls.php:
if($jcp_config[VOTE_RESTRICTION_METHOD] == 'cookie' || $jcp_config[VOTE_RESTRICTION_METHOD] == 'both') {
$cookieName = JUtility::getHash( $app->getName() . COOKIE_PREFIX . $poll->id );
if(isset($_COOKIE[$cookieName])) {
return false;
}
}


Now comment out the code:

// if($jcp_config[VOTE_RESTRICTION_METHOD] == 'cookie' || $jcp_config[VOTE_RESTRICTION_METHOD] == 'both') {
// $cookieName = JUtility::getHash( $app->getName() . COOKIE_PREFIX . $poll->id );
// if(isset($_COOKIE[$cookieName])) {
// return false;
// }
// }

Access to viewing replies is restricted.
No replies found.
You do not have permissions for replying to this topic.
Loading...
Confirm delete? This action is irreversible and the data will be deleted permanently. Do you want to continue? Confirm Add New Delete Unpublish Cancel Import Uninstall The selected item successfully deleted.
Shondalai