How to redirect to the requested page after login?

lckamal - 2 months ago

There is a link to the page which can be accessed by logged user only. When clicking on the link user will be redirected to /login page. After login user doesn't redirect to home or the previous page. It stays to /login itself.

Is there some workaround like pyrocms 2? in 2 we could send login/url/to/redirect

ryanthompson - 2 months ago

You can implement something like this:

This is the default users login page behavior. Might wrap that in an if.. cause if we don't set redirect here it will use the intended redirect (where you were booted from in the first place). So that view may need improvement.

lckamal - 2 months ago

added redirect as query string and worked.