Exemple #1
0
 public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<User> manager)
 {
     // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
     var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
     // Add custom user claims here
     return userIdentity;
 }
 public RequestGUsController()
 {
     userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(db));
 }
 public UserProfilesController()
 {
     userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(db));
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing && UserManager != null)
     {
         UserManager.Dispose();
         UserManager = null;
     }
     base.Dispose(disposing);
 }
 public AccountController(UserManager<ApplicationUser> userManager)
 {
     UserManager = userManager;
 }
Exemple #6
0
 public FriendsController()
 {
     userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(db));
 }