Reputation: 314
I'm not able to update UserAuth through the UpdateUserAuth method in OrmLiteAuthRepository.cs in case the password has not changed and comes as null. In fact the UpdateUserAuth method takes in consideration the password being null for calculating hash and salt - it would work if the ValidateNewUser(newUser, password) was not called in the first line. The ValidateNewUser checks whether the password is null or empty and throws. it looks like a bug and I'm not sure how to workaround.
Upvotes: 1
Views: 223
Reputation: 143359
The UpdateUserAuth
is a public facing API so requires a password to ensure only the user is able update their own profile.
But I've just added a new internal API for OrmLiteAuthRepository in this commit which you can use internally to update the user details without a password with this API:
IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser)
Upvotes: 1