Disable User in ASPNET identity 2.0

后端 未结 10 1142
谎友^
谎友^ 2020-11-30 23:50

I am looking for a way to disable the user instead of deleting them from the system, this is to keep the data integrity of the related data. But seems ASPNET identity only

10条回答
  •  -上瘾入骨i
    2020-12-01 00:11

    You would need to introduce your own flag into a custom IdentityUser-derived class and implement/enforce your own logic about enable/disable and preventing the user from logging in if disabled.

提交回复
热议问题