- Timestamp:
- 01/08/16 10:04:06 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Root.pm
r1582 r1609 46 46 } else { 47 47 # No need to login for About section 48 $c->forward(' login');48 $c->forward('needlogin'); 49 49 return; 50 50 } … … 60 60 } 61 61 62 sub needlogin : Private { 63 my ( $self, $c ) = @_; 64 65 $c->session->{redirurl} ||= $c->req->uri; 66 $c->session->{redirparam} ||= $c->req->params; 67 68 my $sslid = $c->config->{ssl}->{SSL_ID} || 'HTTP_SSL_CLIENT_S_DN_EMAIL'; 69 $c->stash->{sslid} = $ENV{$sslid}; 70 71 $c->stash->{template} = 'login.tt'; 72 } 73 62 74 sub login : Local { 63 75 my ( $self, $c ) = @_; 64 65 $c->stash->{redirurl} = $c->req->uri unless($c->req->path =~ /^login/);66 76 67 77 my $sslid = $c->config->{ssl}->{SSL_ID} || 'HTTP_SSL_CLIENT_S_DN_EMAIL'; … … 75 85 ssl => $c->req->param('use_ssl') || '', 76 86 })) { 77 my $redirurl = $c->stash->{redirurl}; 78 $c->stash->{redirurl} = undef; 79 $c->res->redirect($redirurl || $c->uri_for('/')); 87 my $redirurl = $c->session->{redirurl}; 88 $redirurl->query_form(%{ $c->session->{redirparam} || {}}); 89 $c->session->{redirurl} = undef; 90 $c->session->{redirparam} = undef; 91 $c->res->redirect($redirurl || $c->uri_for('/'), ); 80 92 } else { 81 93 # invalid login...
Note: See TracChangeset
for help on using the changeset viewer.