ASP.Net Webform - update Identity Fields

Dave KIlby
Dave KIlby used Ask the Experts™
on
I have added some extra fields to the aspnet_user tables, one of the fields is a Boolean - ResetPassword that is set to true when user is first created by the Admin.

When the user logs in if the field is a Boolean is sends user to change password - once the user successfully changes their password I want to update the field to false - how do i update a field in the Identity User table easily ?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior .Net Developer
Commented:
from: https://stackoverflow.com/questions/20444022/updating-user-data-asp-net-identity/21644316

var store = new UserStore<ApplicationUser>(new MyDbContext());
var manager = new UserManager(store);
 var user = User.Identity.GetApplicationUser();
// update fields.

manager.UpdateAsync(user);
store.context.saveChanges();

Open in new window

Author

Commented:
Thank you for the help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial