April 21 2009, 9:52

IUser.ChangePassword not persisting new password

When I call ChangePassword on an IUser object and get true in return (indicating successful change) the new password is till not persisted. I have to set the password property of the IUser object and call UpdateUser() to persist the password. What is the intended use of the ChangePassword method? Is it only to check that the correct current password has been provided or is there a bug which causes the password to not be persisted?

  • April 21 2009, 10:30

    ChangePassword validates the password against the password provider and, if it is valid, sets it on the user. Just as you say it doesn't save the user object though. That would be a violation of the general pattern in the community platform where all CRUD-operations except read-operations has to go through a handler .

    So, the method is just a shortcut method for validating the password against the password provider and setting the property, despite the name indicating otherwise :)

  • April 21 2009, 10:41

    Ah, as I suspected. I was confused by the name and the fact that it was a method, but you are correct about the consitency.

First   1   Last