Do you have an requestAction() code? If so, try adding this in
AppController::beforeFilter()

if (isset($this->params['requested'])) $this->Auth->allow($this->action);

http://thewebandthings.synodicsolutions.com/2009/07/01/increasing-life-expectancy-with-2-lines-of-code-cakephp-auth-component/

Also, you should explicitly set $this->Auth->loginRedirect.

On Thu, Oct 1, 2009 at 7:27 AM, mathaios <mathaio...@gmail.com> wrote:
>
> I'm using the Auth component as the example in the manual, but the log-
> in form keeps redirecting to himself, and Firefox throws the error
> "The page isn't redirecting properly".
>
> My app controller is:
>
> class AppController extends Controller {
>
>        var $components=array('Auth','RequestHandler');
>
>    function beforeFilter() {
>                $this->Auth->loginAction = array('admin' => false,  
> 'controller' =>
> 'users', 'action' => 'login');
>                //$this->Auth->allow(array('*')); <<- if I uncomment this line 
> it
> "works" (allow all)
>    }
> }
>
> my users controller (excerpt) is:
>
> class UsersController extends AppController {
>
>        var $name = 'Users';
>        var $helpers = array('Html', 'Form');
>
>        function login() {
>
>        }
>
>        function logout() {
>                 $this->redirect($this->Auth->logout());
>        }
>
> ....
>
> what I'm doing wrong ?
> >
>

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