I guess that when you declare a beforeFilter() method in a controller
(which extends AppController) it overrides the
AppController::beforeFilter() ? Am I right ?

I'm going to do the following :

1) In my AppController I'll put this :

function initializeAuthComponent()
{
        $this->Auth->userModel = "Utilisateur";
        $this->Auth->fields = array('username' => 'login', 'password' =>
'pass');
        $this->Auth->loginAction = array('controller' => 'utilisateurs',
'action' => 'login');
        $this->Auth->loginError = __("Identifiant et/ou mot de passe
incorrect", true);
}

2) In all of my controllers extending AppController I'll do this :

function beforeFilter()
{
        $this->initializeAuthComponent();
        $this->Auth->allow("allowedAction1", "allowedAction2", ...);
}


Thanks for your time.


On 5 juin, 13:02, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> Ignore the previous code, I hit the send button by accident
>
> class ThingsControllers extends Appcontroller {
>
>     var $name = 'Things';
>
>     function beforeFilter() {
>
>         parent::beforeFilter();
>
>         // this controller custom stuff
>
>     }
>
> }
>
> Regards,
> - Dardo Sordi
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to