ASP.net Identity Disable User

前端 未结 4 1719
执笔经年
执笔经年 2020-12-14 06:34

Using the new ASP.net Identity in MVC 5, How do we disable a user from logging in? I don\'t want to delete them, maybe just disable their account for a time period.

4条回答
  •  别那么骄傲
    2020-12-14 07:34

    You can have a new class, which should be derived from IdentityUser class. YOu can add a boolean property in the new class and can use this new property of take care per check for login process. I also done it pretty well. I might wanna take a look at : blog

提交回复
热议问题