I would suggest that I did not actually delete the user. You can simply add a column to the users table, for example:
ALTER TABLE users ADD COLUMN (is_active TINYINT(1) NOT NULL DEFAULT 1);
Then, when you βdeleteβ the user, simply mark them as inactive:
UPDATE users SET is_active = 0 WHERE users.id = 7;
For user lists and account access, you should check the is_active status. To display data, such as messages and what not, you will not care about their active status, you just get the name from the table.
source share