I had to set autoRedirect to false inside each of the login actions,
then it worked OK.

Not sure why setting autoRedirect in the beforeFilter wasn't working
though as I was under the impression that anything in there would be
enacted before the action.

However I guess that a user isn't authenticated until the login action
and so I guess autoRedirect is set again during the login action. I
think I'd probably find that setting it in the beforeFilter only
affects actions other than login.

Oh well, onwards and upwards :)

David

On Aug 25, 4:25 pm, Alexandru Ciobanu <[email protected]> wrote:
> On 8/25/2009 3:14 PM, DavidH wrote:> Hi All
>
> > I'm still trying to put together a login system of admin and normal
> > users. It's pretty much working OK; but for some reason I can't fathom
> > when a user logs in they don;t get refdirected to the page specified
> > in Auth->loginRedirect(). Instead they end up back at the app root
> > page.
>
> Set autoRedirect to false, it defaults to true.
>
> e.i. $this->Auth->autoRedirect = false;
>
> http://api.cakephp.org/class/auth-component
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to