You need to copy for example 'password1' to 'password' in the model data before saving it. (Don't forget to hash it using Auth)
On Fri, Oct 2, 2009 at 9:50 AM, Mukhamad Ikhsan <ikhsan.only@gmail.com> wrote:
and how to set new name a form field but different with database fieldname, but still mapping automatically? in my case, password is a field on users table, if i change the code in view "$this->input('passwordkey');" that form field is not mapping with password field on users table, how to still mapping both of them?
i wan't to change the field on users table, because the $this->Auth->login() hard coded the checking using 'username' and 'password' field name on users table, it's annoying if create own login function.
Thank's before for replyMukhamad IkhsanOn Thu, Oct 1, 2009 at 1:15 PM, Bert Van den Brande <cyruzb@gmail.com> wrote:
As far is I know there is no configuration for this, a workaround is to name your password form fields not 'password'. Keep in mind that you have to manually hash the passwords then using $this->Auth->password($your_password)
On Thu, Oct 1, 2009 at 7:56 AM, Mukhamad Ikhsan <ikhsan.only@gmail.com> wrote:I have a password field that when submiting, the value is already hashed. before, I'm not really concider with this problem, but now i realize because of that, the validation for 'notEmpty' is break. Even i enter the empty, Cake automated hashed the empty value so i never get validation error for notEmpty in password field. There is some configuration for this?
--
Mukhamad Ikhsan
http://www.diodachi.com
--
+6281572181283
Y!id:ikhsan.only
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment