View Full Version : Question About Deleting Users
UserName
Sun 25th Jun '00, 4:55am
If I choose to delete a user from the admin, it tells me that doing so will cause their messages to be converted to "guest" posts. I need to know if there is any process that the script goes through to do this or if simply removing the member from the 'user' table would be an acceptable method. I need to determine if it is ok to simply delete members, even ones that may have posts, from the database directly, or with another script. Will this cause any problems with existing posts by those (now deleted) users?
Thanks!
jscity
Tue 27th Jun '00, 1:26am
I'm guessing there is a process there to convert the username on the posts and such. Not sure what would happen by deleting them in the tables, the posts I think would still exist but I'm not sure if the username would turn to guest that way or not? Not too sure there.
leah r
Tue 27th Jun '00, 4:16am
Well, just by looking in your database, you can see that a registered user's post has no data in the username field and an integer larger than 0 in the userid field, whereas unregistered posts (i.e., "Guest") have a value in username and the number 0 in userid. I just recently observed this when deleting a user; yeah, vB alters the database, so simply removing a user's record from the user table isn't going to suffice...
John
Tue 4th Jul '00, 8:15am
This is what you should do:
1) Get the user's username
2) UPDATE post SET username='$username',userid=0 WHERE userid=$userid
3) DELETE FROM user WHERE userid=$userid
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.