ive got a forum and i allow user to delete their account.
and i want the users threads to still be there and the username to be shown, but i wonder one thing.
if a user is deleted (basically i just NULL their username and password in the table row but i leave everything else intact) and another user is registering the same username, then people will believe that the new user with the same username has created all the threads the previous user created.
or is it routine to not allow new users to pick those usernames who have been deleted?
what is best practice regarding deleting users?
Add an extra column to your users table, called 'deleted' or similar. Default this to zero (false). When the user is "deleted", set this field to 1 (true). That way you won't run across any problems with users having duplicate usernames, as the original will be still present and linked to your existing posts etc.
I would keep a deleted
field in the table as a boolean. Set it to true when the user leaves. Keep usernames unique.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With