PasswordField fails to change the current password and it throws validation errors when no password was changed #1276

Merged
merged 1 commit into from Jun 13, 2012

2 participants

@rusho
Lift Web Framework member

Torstens message:

when I want to change the current password, I see that the apply() method is called and I see the "Password changed" message, but the password is still the old one.

Then, when I try to change the user data (that do not contain the password), I get the error message with that key: "password.must.be.set"
That's not a problem of apply() I think. Rather I would guess that the password field does not validate if it had not been filled with a new password.
And since changing the user data validates the user object and thus also the password field, that problem appears…


setFromAny() is completely wrong, I forgot to rewrite it when doing the change.

group discussion: https://groups.google.com/forum/?fromgroups#!topic/liftweb/OErzpfpyBjk

some of these issues probably cause this problem as well, though set_! shoud stay as is, as far as I'm aware of, so proposed solution should not work: #1256

@rusho rusho was assigned Jun 7, 2012
@rusho
Lift Web Framework member

"when I want to change the current password, I see that the apply() method is called and I see the "Password changed" message, but the password is still the old one."


this is invalid, it turned out to be a MongoDB issue, where in case of no _id, a new one has been assigned, thus record failed to update since there was no matching _id

@dpp dpp merged commit 58705b4 into master Jun 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment