Hi!
I've been trying to recreate the error, but nothing fails in my tests. Just to make sure I test the same thing, this is what I've been trying:
1.) I added a login form to the Basic demo site.
2.) I set the "Read access" for one of the articles to System.
3.) I added a button to reset the password, if the user is logged in.
4.) In the click event of the button, I have this code:
if (!WAFContext.Session.IsAnonymous() && WAFContext.Session.Access.IsStored) {
SystemUser user = WAFContext.Engine.SystemSession.GetContent<SystemUser>(WAFContext.Session.UserId);
string newPassword = user.Password.GenerateAndSetNew();
user.UpdateChanges();
litNewPw.Text = newPassword;
}
It works well, with no error message. The username is still the same after having changed the password. When I logout and try to login again, the new password works as expected.
Am I missing something?