The way I usually handle this sort of thing (outside of symfony) is to store
the $_SERVER['REQUEST_URI'] in the user session somewhere, so when they log
in you can automatically redirect them there. Do this as soon as you decide
the user needs to log in and delete it when they have logged in. I haven't
done this in symfony yet, but I'm sure by storing the module, action and
params you can reconsruct the route and redirect() accordingly.

Hope this helps

Steve

2009/1/6 Lee Bolding <[email protected]>

>
> Ah....
>
> In that case...
>
> Use the sfGuardPlugin, it has this behavior already ;)
>
> On 6 Jan 2009, at 10:49, Sid Bachtiar wrote:
>
> >
> > I'm not using sfGuardPlugin :) I'm asking about this trick with
> > Symfony in general.
> >
> > On Tue, Jan 6, 2009 at 10:42 PM, Lee Bolding <[email protected]> wrote:
> >>
> >> Check the sfGuardPlugin docs, there is a config setting for this, but
> >> I thought that redirection to referer was the default behavior?
> >>
> >>
> >> On 5 Jan 2009, at 22:21, Sid Bachtiar wrote:
> >>
> >>>
> >>> Hi,
> >>>
> >>> Is there any setting in Symfony to redirect user after login to
> >>> where
> >>> they were going?
> >>>
> >>> For example if someone is trying to access a secure page
> >>> 'message/inbox', he/she is redirected to 'access/login', then after
> >>> successful login, I want to redirect him/her back to 'message/
> >>> inbox'.
> >>>
> >>> At the moment I have to custom coded this, but I'm wondering if
> >>> Symfony has a built in way to do this.
> >>>
> >>> Thanks,
> >>>
> >>> Sid
> >>> --
> >>> Blue Horn Ltd - System Development
> >>> http://bluehorn.co.nz
> >>>
> >>>>
> >>
> >>
> >>>
> >>
> >
> >
> >
> > --
> > Blue Horn Ltd - System Development
> > http://bluehorn.co.nz
> >
> > >
>
>
> >
>


-- 
Regards,

Steve Browett
[email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to