Changeset 34 for trunk/lib/Vote/Controller/Ballot.pm
- Timestamp:
- 03/15/09 16:28:12 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Vote/Controller/Ballot.pm
r22 r34 36 36 } 37 37 38 my $ uid = $c->session->{uid} || $c->req->param('uid');38 my $mail = $c->session->{mail} || $c->req->param('mail'); 39 39 my $password = $c->session->{password} || $c->req->param('password'); 40 40 41 if (!$c->model('Vote')->auth_voting($id, $ uid, $password)) {41 if (!$c->model('Vote')->auth_voting($id, $mail, $password)) { 42 42 $c->delete_session('invalid user/pass'); 43 43 $c->stash->{template} = 'ballot/login.tt'; … … 45 45 } 46 46 47 $c->session->{ uid} = $uid;47 $c->session->{mail} = $mail; 48 48 $c->session->{password} = $password; 49 49 50 50 # 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)) { 52 52 $c->stash->{uid} = $c->session->{uid}; 53 53 $c->stash->{template} = 'ballot/signed.tt'; … … 92 92 if ($c->req->param('confirm')) { 93 93 $vote->register_ballot( 94 $ uid,94 $mail, 95 95 $id, 96 96 [ @sbalval ],
Note: See TracChangeset
for help on using the changeset viewer.