lonkaars / connect-4

It's like chess.com but for connect 4
https://connect4.pipeframe.xyz
MIT License
4 stars 0 forks source link

How to handle deleted users #7

Open lonkaars opened 3 years ago

lonkaars commented 3 years ago

Big thread for debate on how user deletion should be handled

  1. Delete the user from the database along with any records that use it's id in the games and social tables Side effects:
    • Other users that have interacted with the deleted user now lose or gain score depending on the score between the two accounts
    • Requires a lot of database searching
    • Actually deletes all of the user's data upon request
  2. Remove all properties from the user and set it's type to "husk" Side effects:
    • The user gets replaced by a dummy "husk" or "ghost" account similar to how GitHub handles deleted accounts
    • Other users that have interacted with the deleted user don't notice any change in score
    • Friend count might have to be updated? (social table should probably still be cleared)
    • This doesn't delete the user record but does wipe the email, password and preferences fields so the user doesn't leave any identifiable information in the database

Another big thing is how to handle pending user deletions, as immediate deletion of an account would be pretty sad if done unintentionally, or intentionally by someone else.