Of course I haven't....

thnx it works.

On Aug 27, 12:40 pm, RichardAtHome <[EMAIL PROTECTED]> wrote:
> Have you added the code to your view to display the error?
>
> http://book.cakephp.org/view/564/displaying-auth-error-messages
>
> On Aug 27, 10:22 am, luigi7up <[EMAIL PROTECTED]> wrote:
>
> > 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 [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