Can be deleted (automatic, periodic) registered users when they do not post any content after 3 weeks?
Announcement
Collapse
No announcement yet.
Can be deleted registered users when they do not post any content after 3 weeks?
Collapse
X
-
-
Originally posted by toplisek View PostCan be deleted (automatic, periodic) registered users when they do not post any content after 3 weeks?
Comment
-
Admin CP -> Users -> Prune / Move UsersSteve Machol, former vBulletin Customer Support Manager (and NOT retired!)
Change CKEditor Colors to Match Style (for 4.1.4 and above)
Steve Machol Photography
Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.
Comment
-
Table user.
Be sure to do an SQL dump or back up of your db, BEFORE messing with it. If you can make a copy of the db as a TEST_DB, and practice on it first, even better.
First, you need to make a new Spammer usergroup in your ACP, and give it no permission to post or have signatures. When it is created, it should show you the usergroupid number on the right side, a drop down item that says Edit usergroup id:### V Go
Then run a SELECT query and see what the results are, to ensure you are culling the right bunch. This will not change any data, just present it:
SELECT userid, username, usergroupid, homepage, posts, joindate, lastactivity
FROM user
WHERE usergroupid=2 usergroupid 2 is the normal Registered Users group, check in your ACP>Usergroup Manager
AND joindate <1298937600 (before Mar 1 2011)
AND lastactivity - joindate < 1814400 (no activity since 21 days after joining)
AND posts < 3
If you are happy, you can move them to the spammer group with this UPDATE query:
UPDATE user SET usergroupid=999 whatever your SPAM usergropid number is, check in your ACP>Usergroup Manager
WHERE usergroupid=2
AND joindate <1298937600
AND lastactivity - joindate < 1814400
AND posts < 3
Now, all those spammers are in your Spammer usergroup. You can go into ACP>Move/Prune users and delete them. I suggest deleting in batches of ~200.
Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment