More in this section

Forums / Developing with Sitefinity / Soft Deleting Users

Soft Deleting Users

2 posts, 0 answered
  1. Jeff Vail
    Jeff Vail avatar
    14 posts
    06 Dec 2003
    25 Apr 2010
    Link to this post

    One of my requirements is that user accounts are never removed from the system...even when deleted.  What is the best way to handle this in Sitefinity 3.7?  Should I add a boolean User Profile field called IsDeleted and modify the stored procedures (v4.0 looks like it does not use SPs) used by the default membership provider to work aound this (i.e. GetAllUsers or GetUser do not return a "deleted" user, etc.).  Should I add this boolean field to the telerik_Users table instead (this table does not exist in v4.0)?  Should I implement a custom membership provider that handles this?

    I know there are multiple ways, but I want to make sure that I am doing this while making the least impact possible to the Sitefinity infrastructure so the ease of future upgrades (I am liking 4.0!) is not compromised.  :)

    Thanks for any tips!


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    25 Apr 2010
    Link to this post
    Hi Jeff Vail,

    You could use IsApproved  property of the MembershipUser class. .When set to false the user will not be able to login and access any resources. Thus, the user will remain in your system. Membership methods can be changed only if you override the methods exposed by ASP.NET MembershipProvider class.

    Another option would be implementing "recycle bin" for the deleted users and store the data in separate table.

    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered