On Jun 18, 8:14 am, Hatori Nakumora <[email protected]> wrote: > Hi Guys, > > I'm using CakePhp 1.3 and the Auth component. > > Heres my setup for the beforeFilter in the app_controller.php > > function beforeFilter() { > if (isset($this->params['requested'])) $this->Auth- > > >allow($this->action); > > $this->Auth->userModel = 'Applicant'; > $this->Auth->fields = array('username' => 'email', 'password' > => 'password'); > $this->Auth->loginAction = array('admin' => false, > 'controller' => 'applicants', 'action' => 'login'); > $this->Auth->loginRedirect = array('controller' => > 'applicants', 'action' => 'profile'); > $this->Auth->authorize = 'controller'; > $this->Auth->autoRedirect = false; > } > > Here's the applicants_controller.php > > function beforeFilter() { > > parent::beforeFilter(); > $this->Auth->allow(array('login', 'logout')); > > }
Don't include login action here as it causes problems for Auth. The login action is special and Auth takes care of allowing it. But, besides that, I see that you have set autoRedirect to false. Do you also have some logic in your login() method? Does anyone else think that Auth::allow() should simply ignore 'login' if it's passed? It seems a bit absurd that this action name should be so troublesome. It should be trivial to add some code to check if it was passed in. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
