The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help with SQL query - Ban Users & Prune Posts/Threads
Hi,
I'm trying to do the exact same thing inlinemod.php does in v4 (permanently ban users, move them to "Banned Users" group and prune all of their posts & threads) but as SQL query so that I can manually insert the userid's. Code:
REPLACE INTO userban (userban.userid, userban.usergroupid, userban.displaygroupid, userban.usertitle, userban.customtitle, userban.adminid, userban.bandate, userban.liftdate, userban.reason) SELECT userid AS userid, usergroupid AS usergroupid, displaygroupid AS displaygroupid, usertitle AS usertitle, customtitle AS customtitle, 1 AS adminid, 1265328000 AS bandate, 0 AS liftdate, 'Spam' AS reason FROM user WHERE userid IN(___USERID___); UPDATE user SET usergroupid = 8 WHERE userid IN(___USERID___); DELETE FROM post WHERE userid IN (___USERID___); DELETE FROM thread WHERE postuserid IN (___USERID___); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|