Re: Password field is automatically hashed, how to change this?
I am not sure, but I remember something around here solved that: http://teknoid.wordpress.com/2008/10/08/demystifying-auth-features-in-cakephp-12/ http://book.cakephp.org/de/view/384/hashPasswords On Oct 1, 7:56 am, Mukhamad Ikhsan ikhsan.o...@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 Ikhsanhttp://www.diodachi.com --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Password field is automatically hashed, how to change this?
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 reply On Thu, Oct 1, 2009 at 1:15 PM, Bert Van den Brande cyr...@gmail.comwrote: 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.o...@gmail.comwrote: 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 -- Mukhamad Ikhsan +6281572181283 Y!id:ikhsan.only http://www.diodachi.com --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Password field is automatically hashed, how to change this?
Automatic mapping will not be possible. 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.o...@gmail.comwrote: 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 reply On Thu, Oct 1, 2009 at 1:15 PM, Bert Van den Brande cyr...@gmail.comwrote: 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.o...@gmail.comwrote: 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 -- Mukhamad Ikhsan +6281572181283 Y!id:ikhsan.only http://www.diodachi.com --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Password field is automatically hashed, how to change this?
Just do this in your action, before you do a save. $this-data['User']['password'] = $this-Auth-password($this-data ['User']['passwordkey']); On Oct 2, 12:50 am, Mukhamad Ikhsan ikhsan.o...@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 reply On Thu, Oct 1, 2009 at 1:15 PM, Bert Van den Brande cyr...@gmail.comwrote: 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.o...@gmail.comwrote: 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 -- Mukhamad Ikhsan +6281572181283 Y!id:ikhsan.onlyhttp://www.diodachi.com --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Password field is automatically hashed, how to change this?
Just rename the field to something else, like password1. Once it passes validations just set password to equal password1. Thats what most people do, and yes its quite annoying in the way Auth is handled. On Sep 30, 10:56 pm, Mukhamad Ikhsan ikhsan.o...@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 Ikhsanhttp://www.diodachi.com --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Password field is automatically hashed, how to change this?
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.o...@gmail.comwrote: 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 --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Password field is automatically hashed, how to change this?
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 --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---