Permalink
Browse files

Merge pull request #84 from f00li5h/patch-1

pref('enforce_login') redirects to $requested_path.login rather than /.lo
  • Loading branch information...
2 parents 5e4d7ee + dfed2bc commit b9ec7ac73ce31a598797122098f16a3e921a6507 @marcusramberg marcusramberg committed Sep 2, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/MojoMojo/Controller/Root.pm
@@ -124,7 +124,11 @@ sub auto : Private {
return 1;
}
if ( !$c->user_exists ) {
- $c->res->redirect( $c->uri_for('/.login') );
+ $c->res->redirect(
+ $c->uri_for(
+ $c->stash->{path} . '.login' # send them to the login for this page
+ )
+ );
}
}

0 comments on commit b9ec7ac

Please sign in to comment.