public CustomUserManager(ICustomUserStore <ApplicationUser> store) : base(store) { _store = store; UserValidator = new UserValidator <ApplicationUser>(this) { AllowOnlyAlphanumericUserNames = false, RequireUniqueEmail = true }; PasswordHasher = new CustomPasswordHasher(); PasswordValidator = new PasswordValidator { RequiredLength = 6, RequireDigit = true, RequireLowercase = true, RequireUppercase = true }; }
public ApplicationUserManager( ICustomUserStore store, IUnitOfWork uow, Lazy <Func <IIdentity> > identity, // For lazy loading -> Controller gets constructed before the HttpContext has been set by ASP.NET. IApplicationRoleManager roleManager, IDataProtectionProvider dataProtectionProvider, IIdentityMessageService smsService, IIdentityMessageService emailService) : base((IUserStore <ApplicationUser, int>)store) { _store = store; _uow = uow; _identity = identity; _users = _uow.Set <ApplicationUser>(); _roleManager = roleManager; _dataProtectionProvider = dataProtectionProvider; this.SmsService = smsService; this.EmailService = emailService; createApplicationUserManager(); }