cake-php@googlegroups.com
[Top] [All Lists]

Re: $this->Auth->loginAction not redirecting as requested

Subject: Re: $this->Auth->loginAction not redirecting as requested
From: Wim Olivier
Date: Tue, 7 Sep 2010 00:11:53 -0700 PDT
I managed to find the reason for the problem.
I was using beforeFilter in both app_controller and
customers_controller, and had to add the following to
customers_controller for it to work:

parent::beforeFilter();



On Sep 6, 2:18 pm, Wim Olivier <wimoliv...@xxxxxxxxx> wrote:
> Hi everyone,
>
> I need the Auth component to redirect to /customers/login and not to
> /users/login, but cannot get it to work.
> Any ideas?
>
> *app_controller.php:
> *
> class AppController extends Controller {
>
>     var $components = array('Auth', 'Acl');
>
>     function beforeFilter() {
>
>         $this->Auth->userModel = 'Customer';
>         $this->Auth->fields = array('username' => 'email', 'password' =>
> 'password');
>         $this->Auth->loginAction = array('admin' => false, 'controller' =>
> 'customers', 'action' => 'login');
>     }
>
> }
>
> ?>
>
> Thanks,
> Wim

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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

<Prev in Thread] Current Thread [Next in Thread>