If you're using the Auth Component you will need to have a password confirm
field to achieve what you wanted through model validation.

This is because the value is hashed before you can run validation checks on
it, for example if you check that "password" is between 6 and 16 characters,
you'll be checking against maybe a 40 character hash. password_confirm
however isn't hashed.

The only way to validate password with the Auth Component without
password_confirm seems to be in the beforeFilter of your controller, but
this isn't really the MVC way to do it.

Someone may correct me on this however

Kind Regards
 Stephen

On 22 December 2010 04:01, John Maxim <[email protected]> wrote:

> Thanks Stephen!
>
> This is solved. However, I'm just curious is it we have to create
> password_confirm field just to validate password? Is this the only
> way ?
>
>
>
> On Dec 22, 12:54 am, Stephen <[email protected]> wrote:
> > No problem John.
> >
> > This may help with ACL implementation
> >
> > I strongly recommend you study some articles online to get your head
> around
> > how it works as well however.
> >
> > http://bakery.cakephp.org/articles/alaxos/2010/11/21/acl_plugin_5
> >
> > --
> > Kind Regards
> >  Stephen @ NinjaCoderMonkey
> >
> >  www.ninjacodermonkey.co.uk
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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