set $this->Auth->autoRedirect = false; and then handle the redirect in
the login() function: $this->redirect($this->Auth->redirect());

On Sat, Mar 7, 2009 at 8:55 PM, calzone <[email protected]> wrote:
>
> There seems to be an issue with cake 1.2.1.8004 relative to 1.2.0.7692
> RC3 because I am using the exact same login routines for both on two
> different apps and in the older version, the code gets processed
> during the login.
>
> Under 1.2.1.8004 no code I put inside the login() function gets
> processed at all during login.
>
> Stuff I put inside login routines will fire when the page first LOADS
> but not after submit.
>
> For example, I added an if($this->Auth->user())...else construct. But
> when I try to submit, neither the if nor the else fires!
>
> Something else that's strange is contrary to the CakePHP manual,
> password data submitted to the user controller does not get hashed at
> all EXCEPT in (1) the login() function and (2) a create action using
> with $this->User->save().  But if when I submit an edit action, the
> password is not hashed and I had to do it manually.
>
> Maybe there's something weird about my setup I'm overlooking that
> would cause these two symptoms? Or is it something about 1.2.1.8004?
>
> Here's the relevant code:
>
> var $components = array('RequestHandler','Auth','Acl');
>
> function beforeFilter()
> {
>  $this->Auth->allow('logout');
>  $this->Auth->authError = "Please login.";
> }
>
> function login()
> {
>
> if ($this->Auth->user())
> {
>  [... some code to collect ip address and update last_login info in
> user model]
> }
>
> }
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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