Tuesday, February 28, 2012

Re: Having issue with AUTH in 2.1

Even that way give me the same strange sql error


On 28 Feb., 10:33, luca capra <luca.ca...@gmail.com> wrote:
> Il 28/02/2012 09:55, heohni ha scritto:
>
>
>
>
>
>
>
> > I did this, see above?
>
> > On 28 Feb., 09:36, "@dariobarila"<dario.bar...@gmail.com>  wrote:
> >> Hello,
> >> try to configure the Auth fields on the same level of  $components =
> >> array('Auth');
>
> >> On 28 Feb, 09:33, heohni<heidi.anselstet...@consultingteam.de>  wrote:
> >> ...
> >>>          $this->Auth->fields = array('username' =>  'usr_username',
> >>> 'password' =>  'usr_password');
> >>>          $this->Auth->allowedActions = array('display', 'index',
> >>> 'add');
> >>>          $this->Auth->autoRedirect = false;
> >>>          $this->Auth->logoutRedirect = array('controller' =>
> >>> 'bookmark', 'action' =>  'search');
> >>>          $this->Auth->loginRedirect = array('controller' =>  'pages',
> >>> 'action' =>  'display', 'home');
> >>>      }
>
> >>> ...
> >>> SELECT `User`.`usr_id`, `User`.`usr_username`, `User`.`usr_password`,
> >>> `User`.`created` FROM `project`.`users` AS `User`   WHERE
> >>> `User`.`username` = 'me' AND `User`.`password` =
> >>> '998992c0dfcffb9ad442a85be2d636ba37228c3d'    LIMIT 1
>
> I think he means something like (read the book):
>
> $components = array(
>    'Auth' =>  array(
>              'authenticate' =>  array(
>                  'Form' =>  array(
>                      "fields" =>  array(
>                          'username' =>  'usr_nameuser',
>                          'password' =>  'usr_wordpass'
>                      ),
>                  )
>             ),
> );

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: