the active_record_helper returns a password field automatically if
strstr($column_name,'password') === true
thats case-sensitive, though, so 'member_password' or simply 'password' should work.
I don't think you could set any options here. You could use the _form_helper_in case you can't rename the column.
(Any arguments against patching this to use stristr? Anyone?)
hi suthern, why dont you use beforeSave ?
function beforeSave(){
$this->password = md5($this->password);
return true;
}
NOTE: all methods like beforeSave,beforeUpdate,afterCreate,after... etc..., need to return true or false.
One more question on this subject. My system is setup so that a user only needs to click on a name, and then type in the password.
The funny thing is, by the time they get to the password screen the field is already filled in.
<?php echo $form_helper->password_field('person', 'password', array("value" => '')) ?>
does not set the value to blank. The value remains that of the users password, which is really very useless. Why have a password field if the data is already typed in? (storing as plaintext. heh)
What's the akelos way to fix this? can I FORCE the value to be blank? I know I can write my own simple little helper to put a normal textfield with the correct name, but I was curious what you guys would do.
1 to 7 of 7