My first page is a static page, which is ignored by AuthComponent ($this->Auth->allow('display')). Because of enabling and disabling parts of my menu-element, I also want to login via the cookie at this moment and not only, when an action is called, which is behind the AuthComponent.
Do you have any idea to solve this problem?
Thanks!
alex:
are you calling parent::beforeFilter(); within the UsersController's beforeFilter? if you don't, it will only execute the UsersController's beforeFilter, and not both.
Hey, great piece of code!
Perhaps you should use a custom variable to access the Auth component to make the component more generic and easy to extend/use. For example, one might be using an extension of the Auth component called 'SuperiorAuth'. Using a custom variable to tell the RememberMe component what Auth component it should use will easily let users implement this component into their existing code environment.
So, instead of this:
$this->Auth->call_method();
You would have this:
var $authComponent = 'SuperiorAuth';
$this->{$this->authComponent}->call_method();
Which could then also be set from the AppController, like so:
$this->RememberMe->authComponent= 'SuperiorAuth';
What say you?