Reputation: 2391
How can I in my custom controller get an instance of ApplicationUserManager so that I can find a user by its id and then be able to update the user?
Upvotes: 0
Views: 829
Reputation: 14741
Simply call:
var userManager = HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();
inside any action you want to access the user manager. you also need to add following namespace also:
using Microsoft.AspNet.Identity.Owin;
Upvotes: 1