← Back to Upcase

Posts with a deleted user

(Edward Loveall) #1

If I have a blog with users and for whatever reason the user needs to be removed (no longer is part of the blog, deletes their account, etc), what’s the best way to keep the post? Instead of deleting the user would you just make it so they’re no longer able to log in? Remove them from the database and hard code their name each post somehow? This is open ended, but I’m wondering if thoughtbot (or others) have dealt with this before.

(Manish Valechha) #2

@ed_wassermann you can soft delete users. Give each user a status, active or deleted. Then when the user deleted their account, just change their status to deleted and like you mentioned prevent them from logging in.

(Edward Loveall) #3

Thanks @manishval! I’ll try that.