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'));

    }


I could access the login page on /applicants/login, but when you
submit the login form with a correct login details
a redirect loop occurs. But you could access the others functions when
you've type the url manually on the browser.
Here's the log on the applicants controller's beforeFilters :

2010-06-18 20:09:45 Debug: Here: /jobs/applicants/login, coming from: /
applicants/login
2010-06-18 20:09:46 Debug: Here: /jobs/applicants/login, coming from: /
applicants/login
2010-06-18 20:09:46 Debug: Here: /jobs/applicants/login, coming from: /
applicants/login


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

Reply via email to