Hi Bjorn, I experienced similar strange behavior, when I didn't log out before logging in again. If $this->Session->read('Auth.User.id') is still valid, the login-action seems not to be performed, because it's not necessary. Same happens then to the redirect. Be sure to destroy all sessions and cookies within your logout-method before login. That's the way I got it working.
Or set $this->Auth->autoRedirect = false in appController, and in our login-action insert the following: if($this->Session->read('Auth.User.id')) { $this->redirect('/users/index'); } This redirects the request without doing the login, whenever a valid Auth.session is found. And put the remainig login-action behind an else-clause... if($this->Auth->login($this->data)) { $this->redirect( $this->Auth->redirect); } That's what I am thinking... hope it's helpful. Regards, Hendrik. On Feb 15, 8:44 pm, Bjorn <lindstrombj...@hotmail.com> wrote: > Hi, > > I just updated to version 8004 from 7296 and now I have problem with > logging in. > > In my beforeFilter in app_controller I have the following > > $this->Auth->loginAction = array('controller' => 'users', > 'action' => 'login'); > $this->Auth->logoutRedirect = array('controller' => 'users', > 'action' => 'login'); > $this->Auth->loginRedirect = array('controller' => 'users', > 'action' => 'index'); > > and the login function in users_controller is empty. > > When I click on login (with filled in user and pass) the page just > reloads and the fields are cleared. While debugging the login method > in the auth component I see that it returns true... so im really > confused about whats going on.. > > I see some other posts about problem with logins after updating but > never any real solution. I have already tried to remove the salt value > and remove the user and re-register.. but nothing helps :/. To make it > even weirder the code works fine when I upload it to my server (and > not on localhost). I used different databases but synched them just > some days a go so im feel really clueless.. > > Thanks for any ideas. > > Bjorn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---