Forumlar / Craftwork / Server-side / Drop a user via sql command?

jmc92
#1 2010-09-11 23:17
Is there a way to drop a single user and all of his posts without damaging the database?
GHengeveld
#2 2010-09-12 03:31
Do you mean you want the user removed, as if he was never there?
Removing a user normally keeps his posts intact, so you should be looking at a plugin for this. I believe there is something like that. You can try the User Manager plugin, but I'm not sure it deletes forum posts as well.

Removing forums posts along with the user can be tricky, since you're not only deleting posts, but possibly entire topics as well (if the user created any). You'd also have to think about other users' posts since they may have quoted the user you're deleting.

If you're only doing this to remove one specific user from your website, I think it's easier to remove the posts/topics manually (if there's not too many) and then remove the user or ban him.

If you still want to remove him through SQL, I can write the commands for you (use at your own risk).
jmc92
#3 2010-09-12 12:38
An sql command would be nice
Thanks :)
And for example:
a user comes on
Makes 800 spam topics
Whats a quick way to get rid of it without wiping the whole section?