I'm having 2 login forms in my (cake) application. One on the home page (served by pages controller) and one in my user controller. The one from my user controller is working fine. But when I try to login from the homepage I get a blank page and I see in firebug I got a 404. The strange thing is that the session is setup OK.
It's looks like it has something to do with $this->Auth->autoRedirect = false (which is set in user controller beforeFilter()). What could be the problem?
This is how my login action looks like:
function login()
{
/* Werkt nog niet vanuit `home login` */
if ($this->Auth->user())
{
if(!empty($this->data))
{
/* Update last login */
$this->User->id = $this->Auth->user('id');
$this->User->saveField('last_login', date('Y-m-d H:i:s'));
}
$this->redirect($this->Auth->redirect());
}
}