Ignore:
Timestamp:
03/15/09 16:28:12 (15 years ago)
Author:
nanardon
Message:
  • voting identifier is now the email
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Vote/Controller/Ballot.pm

    r22 r34  
    3636    } 
    3737 
    38     my $uid = $c->session->{uid} || $c->req->param('uid'); 
     38    my $mail = $c->session->{mail} || $c->req->param('mail'); 
    3939    my $password = $c->session->{password} || $c->req->param('password'); 
    4040 
    41     if (!$c->model('Vote')->auth_voting($id, $uid, $password)) { 
     41    if (!$c->model('Vote')->auth_voting($id, $mail, $password)) { 
    4242        $c->delete_session('invalid user/pass'); 
    4343        $c->stash->{template} = 'ballot/login.tt'; 
     
    4545    } 
    4646 
    47     $c->session->{uid} = $uid; 
     47    $c->session->{mail} = $mail; 
    4848    $c->session->{password} = $password; 
    4949 
    5050    # login succeed, but those this user has already voted 
    51     if (my $date = $c->model('Vote')->voting_has_sign($id, $uid)) { 
     51    if (my $date = $c->model('Vote')->voting_has_sign($id, $mail)) { 
    5252        $c->stash->{uid} = $c->session->{uid}; 
    5353        $c->stash->{template} = 'ballot/signed.tt'; 
     
    9292    if ($c->req->param('confirm')) { 
    9393        $vote->register_ballot( 
    94             $uid, 
     94            $mail, 
    9595            $id, 
    9696            [ @sbalval ], 
Note: See TracChangeset for help on using the changeset viewer.