[Catalyst] upon successful login, how do i get redirect users
back to the page they wanted to access previously?
oliver.g.charles at googlemail.com
Sat Apr 18 12:02:43 GMT 2009
On Sat, Apr 18, 2009 at 2:34 AM, <kakimoto at tpg.com.au> wrote:>
> hi, everybody,
> upon successful login, how do i get redirect users back to the page they
> wanted to access previously (which is
> www.lginsurance.com.au/subcriptions/add)? At the moment, upon successful
> login, menu.tt2 will be called.
At work we do this with http://tr.im/j75v . If an action requires the
user to be authenticated, they call $c->forward('/user/login'). If
they are logged in, that action returns immediately and the action can
continue. Otherwise, the current URI is stored in session, and the
login form is presented. Then, when the login is successful, the URI
is restored, and the user is redirect.
However... after seeing Devin's approach, which is essentially the
same but without the session, I may change to that. I believe the two
approaches are essentially the same though.
Oliver Charles / aCiD2
More information about the Catalyst