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;
// }
// }

Follow me on twitter: https://twitter.com/corejoomla
If you use our extensions, please post a rating and a review at the Joomla! Extensions Directory.
SurveysCjForum | Polls | Answers | Quizzes | Quotes | GPS Tools | Sociable

Like it on Facebook, Tweet it or share this topic on other bookmarking websites.
  • No replies found for this topic.
You do not have permissions to reply to this topic.
Powered by CjForum