Do not allow response if the invitation has already been processed

master
Daniel Berteaud 11 years ago
parent fbd3fa4830
commit 2511d72663
  1. 2
      public/vroom.pl

@ -484,7 +484,7 @@ helper add_invitation => sub {
helper get_invitation => sub { helper get_invitation => sub {
my $self = shift; my $self = shift;
my ($id) = @_; my ($id) = @_;
my $sth = eval { $self->db->prepare("SELECT * FROM `invitations` WHERE `token`=?;") } || return undef; my $sth = eval { $self->db->prepare("SELECT * FROM `invitations` WHERE `token`=? AND `processed`='0';") } || return undef;
$sth->execute($id) || return undef; $sth->execute($id) || return undef;
return $sth->fetchall_hashref('token')->{$id}; return $sth->fetchall_hashref('token')->{$id};
}; };

Loading…
Cancel
Save