add something like this into your User model:

public function beforeSave() {
    if (isset($this->data[$this->alias]['before_password'])) {
      $this->data[$this->alias]['password'] =
AuthComponent::password($this->data[$this->alias]['before_password']);
    }
return true;
}

accordingly you need to set into your view:

<?php echo $this->Form->input('User.username'); ?>
<?php echo $this->Form->input('User.before_password', array('type' =>
password)); ?>

try that.
cheers




On Sat, Dec 15, 2012 at 1:17 PM, polutan <linspir...@gmail.com> wrote:

> repeat and repeat again your effort.. try and error..
>
>
> 2012/12/13 ashy <ashcsi1...@gmail.com>
>
>> Hello All,
>>
>> I am following the tutorial below
>>
>> http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#identifying-users-and-logging-them-in
>>
>> The password is not getting hashed by user add method. Thats the reason,
>> authentication is not getting completed. Any ideas?
>>
>> thanks
>>     ashy
>>
>> --
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> ---
>> 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
>> cake-php+unsubscr...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>>
>>
>>
>
>
>
> --
> *Coklat Stroberi -- Web Dev Training Centre*
> http://www.facebook.com/pages/Coklat-Stroberi/249514251728226  (info
> lebih lanjut)
> http://coklatstroberi.net
> Jl. Raya Padang Luwih (Dalung) No.141 - Telp. (0361) 9006118 atau
> 08174128301 - Badung, Bali. Sebelah timur traffic light pertigaan
> perumahan dalung permai.
>
>
>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>



-- 
*Ivan Rimac***
mail: ivn...@gmail.com
*tel: +385 95 555 99 66*
*http://ivanrimac.com*

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to