On Sat, Apr 18, 2009 at 2:34 AM, <[email protected]> wrote:> > hi, everybody, > > [snip] > > 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 _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
