The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
DataManager: How to delete ALL a user's posts and threads based on userid ?
Hello,
How can we replicate the functioning of the "Delete as Spam" feature (where we HARD delete all posts and threads by a specific user) using the DataManager? Thanks! |
#2
|
||||
|
||||
I think delete all posts can only be done via admincp
Code:
http://site.com/admincp/thread.php?do=pruneuser&f=-1&u=[USERID]&confirm=1 |
#3
|
|||
|
|||
Quote:
Is there a more straightforward method for a script ? |
#4
|
|||
|
|||
In inlinemod.php there's a section that deletes a users threads and posts when a moderator chooses "delete as spam". The moderator can choose "Delete other posts and threads started by the affected users", and the code for that starts around line 1358:
PHP Code:
it looks like it just looks up the thread and post ids and creates a thread or post datamanager for each one and calls delete(), but it also does some "verifying" before that, and I'm not sure why or if it's necessary. Also, after all the deleting is done it calls build_thread_counters() for each thread that had posts deleted, and build_forum_counters() for each affected forum. I also see that if a user has more than 50 posts or threads it doesn't try to do a mass delete, and I don't know if that's just a safety measure or if it would fail. Sorry I don't have a better answer than that for you. |
#5
|
|||
|
|||
thanks
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|