Hello group,

I got a (hopefully) small problem with the authentication component
combined with the beforeFilter function in the appController. I use
the following code in app/appController.php:

--
class AppController extends Controller {
        var $components = array('Auth');

        function beforeFilter() {
                $this->Auth->loginAction = array('controller' => 'users', 
'action'
=> 'login');
                $this->Auth->fields = array('username' => 'email', 'password' =>
'password');
                $this->Auth->loginError = __('Benutzername und/oder Passwort 
nicht
gefunden', true);
                $this->Auth->authError = __('Sie verfügen nicht über die
erforderlichen Rechte', true);
                $this->Auth->logoutRedirect = '/';
                debug($this->Auth, true);
        }
        function isAuthorized() {
                return true;
        }
}
--

As you can see, i configured the auth-component a bit. When calling a
non-users action (for example posts/index) everything is ok: I am
redirected to users/login,  get a message 'Sie verfügen nicht über die
erforderlichen Rechte' and the debug output (in fact the script stops
there, as the headers have already been send).

The problem is, when the users/login page is called again (wrong
password) the beforeFilter method is not called. The debug message
will not display and I get the default loginError Message (and the
worst thing: the fields are back to default as well).

Since I couldn't really find anything on this topic I figure I am
doing something wrong here, but can't find an error..

Thanks a lot and please excuse my english,
harpax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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