ruby on rails - Allow users to remove their account -


I am developing a gallery that allows users to post, comment, vote, and more.

Now I feel that if the user wishes to cancel and delete all of his data it is correct. However, it is difficult to allow such a thing because you run the risk of breaking your application (for example, what should I do if multiple comments are given a comment? What should I do with those pages in which different Have many revisions made by users?).

Photos can be easily removed, but for other data (i.e. comments, revisions ...) I thought there are three possibilities:

  • Specify this as a user named "deleted users"
  • Promote existing organizations (i.e. User ID) and only rename the user's data (ex. Assign a new username to "Deleted users-24" and a non-existent e-mail like "not-sent-user-24 @ msat dot com"

When we allow users to remove their accounts What are the best practices for following them? How can you apply them specifically (especially in rail)?

Ideally in a system that you do not want "hard delete" data. Which is the best way Mr. I know and we have implemented in the past to remove "soft" Maintain the Status column in your data table, which is the active line is that this refers to the fact or not. Any line created is "Active" by default; Although the entries are removed; They become inactive

All selected queries that display data on screen filter results only for "Active Records", in this way you can get the following benefits: 1. Data recovery is possible. 2. You can do a scheduled task at the database level, which can take care of the hard removal once at a time; If really needed (like a SQL process or something like that) 3. You can decide on an admin screen, which account, entries etc. you may be able to decide exactly what you want to remove 4. A disadvantage of account can also be applied with the same solution.

In a situation where I have worked, a hard delivery is not a strict knot-no. Actually, audit is also maintained to be removed. But if the application is really small; It can be up to the user.

I still recommend "virtual delete" or "soft delete" with periodic cleanliness at the DB level; Which will be cleansed in a fast and efficient way of cleaning.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -