Password Not Resetting

Posted by Community Admin on 04-Aug-2018 14:55

Password Not Resetting

All Replies

Posted by Community Admin on 23-Jun-2015 00:00

Hi,

I am trying to reset the user password with the Sitefinity API as following

             UserManager userManager = UserManager.GetManager();
             userManager.Provider.SuppressSecurityChecks = true;
            User user = userManager.GetUser(<username>);

             string reset = user.ResetPassword();

The Api returns a random string which I suppose is thenew reset password. But when I try to login with this new password it doesnt work and the old password seems to be working even after the reset is called.

Any thought?

Posted by Community Admin on 26-Jun-2015 00:00

Hello Aby,

Can you please make sure that you call SaveChanges() after you reset the password of the user:

user.ResetPassword();
userManager.SaveChanges();

Regards,
Sabrie Nedzhip
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed