My
$this->Auth->loginError ='Invalid username or password';
won't show on login.ctp view

This is what I have in app_controller:
        var $components = array('Acl','Auth');

                function beforeFilter(){
                        //Mijenja hash funkciju auth komponente iz defaultne u 
md5
                        Security::setHash('md5');
                        $this->Auth->fields = array('username' => 'username', 
'password' =>
'password');
                        $this->Auth->loginAction = array('controller' => 
'users', 'action'
=> 'login');
                        //$this->Auth->loginRedirect = array('controller' => 
'users',
'action' => 'index');
                        $this->Auth->loginError ='Invalid username or password';
                        $this->Auth->logoutRedirect = '/';
                        $this->Auth->authorize = 'controller';

                }

                /*When authorize is set to 'controller',
                you'll need to add a method called isAuthorized() to your
controller.
                This method allows you to do some more
                authentication checks and then return either true or false.*/

                function isAuthorized() {
                        return true;
                }
In users_controller my login() is empty because Auth component
automagic

and when I debug my session with debug($_SESSION); I see that error is
sent, but it si always set - even when I call users/login action for
the first time (I mean without submiting wrong data)?!?!:
Array
(
    [Config] => Array
        (
            [userAgent] => 0f8a6ac2e2c891dce1f3f114fdaad715
            [time] => 1219830026
            [rand] => 32701
            [timeout] => 10
        )

    [Message] => Array
        (
            [auth] => Array
                (
                    [message] => Invalid username or password
                    [layout] => default
                    [params] => Array
                        (
                        )

                )

        )

How can I get this login error working?


thanks



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