Use Username instead of Email for identity in Asp.net mvc5

前端 未结 4 1264
南旧
南旧 2020-12-02 15:49

Whenever I create a new application with visual studio 2013 express for web and using the individual accounts authentication and i hit the register button I notice that it i

4条回答
  •  感动是毒
    2020-12-02 16:25

    In order to make email as non unique:

    Configure below in IdentityConfig

    manager.UserValidator = new UserValidator(manager)
                {
                    AllowOnlyAlphanumericUserNames = false,
                    RequireUniqueEmail = false                
                };
    

提交回复
热议问题