Fix: a registered user was not able to vote if a visitor had voted from the same ip
This commit is contained in:
parent
29e610d5a8
commit
c3273e1d53
1 changed files with 2 additions and 2 deletions
|
|
@ -28,8 +28,8 @@ our @ISA = qw(WebGUI::Asset::Wobject);
|
|||
sub _hasVoted {
|
||||
my $self = shift;
|
||||
my ($hasVoted) = WebGUI::SQL->quickArray("select count(*) from Poll_answer
|
||||
where assetId=".quote($self->getId)." and ((userId=".quote($session{user}{userId})."
|
||||
and userId<>'1') or (userId='1' and ipAddress='$session{env}{REMOTE_ADDR}'))");
|
||||
where assetId=".quote($self->getId)." and ((userId=".quote($session{user}{userId})."
|
||||
and userId<>'1') or (userId=".quote($session{user}{userId})." and ipAddress='$session{env}{REMOTE_ADDR}'))");
|
||||
return $hasVoted;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue