forked from lix-project/hydra
fix redirect after login
This commit is contained in:
parent
822ca9c29e
commit
673ef76020
|
@ -39,7 +39,7 @@ sub login :Local {
|
||||||
my $username = $c->request->params->{username} || "";
|
my $username = $c->request->params->{username} || "";
|
||||||
my $password = $c->request->params->{password} || "";
|
my $password = $c->request->params->{password} || "";
|
||||||
|
|
||||||
if(! $username && ! defined $c->flash->{afterLogin}) {
|
if($username eq "" && $password eq "" && ! defined $c->flash->{afterLogin}) {
|
||||||
my $baseurl = $c->uri_for('/');
|
my $baseurl = $c->uri_for('/');
|
||||||
my $refurl = $c->request->referer;
|
my $refurl = $c->request->referer;
|
||||||
$c->flash->{afterLogin} = $refurl if $refurl =~ m/^($baseurl)/ ;
|
$c->flash->{afterLogin} = $refurl if $refurl =~ m/^($baseurl)/ ;
|
||||||
|
|
Loading…
Reference in a new issue