Closed creatoro closed 13 years ago
This doesn't solve the issue because when you set the extra validation doesn't overwrite old password field rules.
So not_empty
rule is active and validation fails if you doesn't send any password.
This way validation will only fail if you try to update the password with an empty string. If you don't send password it won't execute the not_empty
rule as the field is unchanged.
Oh sorry I didn't test when I wrote the comment. It works perfect. I don't know why I need to use the hacky code I used... Now works perfect using:
$user->update_user($_POST, array('username', 'password', 'email'));
The Auth driver's
update_user()
method says:But it doesn't remove the password from the exptected array, so it's not possible to update the user without setting a password. Also, the password field has an unnecessary rule.