I am having trouble getting the Auth component do the redirects I want in a CakePHP 1.2.6 app.
I have a login form that appears on all pages and I want to keep the
Put this code to your controller:
function beforeFilter() { $this->Auth->allow('login', 'logout'); $this->Auth->autoRedirect = false; parent::beforeFilter(); }
and, add this for the login page:
function login() { if($this->Auth->User()) { $this->redirect(array('action'=>'welcome'), null, true); } }