Hello,

I'm using cake 2.1 with AuthComponent and standard data modelusers.

How I can edit a user without changing the password?

For example, add a check "I want to change the password." If thischeck is 
true then I make a hash of the password and keep it inserted.Otherwise I do 
not modify the password field.
How do I add this check and then check it in my beforeSave() function?

Another option I can think of is to leave the password field empty when I 
go to edit a user (unset ($ this-> request-> data ['User'] ['password']) ;)and 
then check if the password is empty or not. But .... when I insert a new 
user the password field should be mandatory ....

Do you have any ideas?

thanks

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to