View Full Version : Automatic Inactive Users Pruning
Revan
03-27-2005, 10:00 PM
As requested by Watson here (https://vborg.vbsupport.ru/showthread.php?t=78905).
What this hack does:
Runs a daily cronjob, removing all members according to the script's configuration
Flag an user for deletion after x days (15 by default)
Email an user that has been flagged (off by default)
Has the ability to prune users that match ALL these conditions:
Has not visited in the last x days (30 by default)
AND
Has not posted in the last x days (30 by default)
AND
Has x or fewer posts (0 by default)
AND
Has been flagged for deletion earlier than x days (15 by default)
Send email to deleted users, notifying them of their terminated membership (off by default)
Ability to move to a different usergroup instead of deleting them
To get started, simply read the attached .txt file :)
//peace
nexialys
03-28-2005, 02:45 PM
what is the difference with the one from here ???
https://vborg.vbsupport.ru/showthread.php?t=75740
()
tnguy3n
03-28-2005, 02:48 PM
I released a similar hack a while back, but good work still. :cool:
Revan
03-28-2005, 03:28 PM
Balls. Sorry, didnt see that one.... :(
Sin City
03-28-2005, 08:01 PM
very nice *installs* :)
I like this one, Thanks Revan
Revan
03-30-2005, 04:56 AM
Thanks people :)
And the difference between the two hacks, after closer studies, is the fact that my hack can also email the users telling them that they have been deleted.
I value this feature because it would be annoying for an user to try to revisit if he remembers your forum at a later point, only to find his account terminated without explanation.
When I get home I will further improve this hack, by flagging the users for deletion, emailing them about the fate of their accounts, then after x amount of days (config), if the user still applies to the "flagged for deletion" groups, delete them (and optionally mail them about it).
Watson
03-31-2005, 07:24 PM
superb mate, thanks a million for this. Will install it as soon as me site is changed over to me new server :):):)
Ala21
04-10-2005, 02:43 PM
I installed this, and executed with 100 days last activity & posts and 300 posts to be "immune".
Can you tell me why it says "skipped user" when I run it, for some users, even if they don't have 300 posts and they have over 100 days of inactivity? Why are they being skipped?
Ala21
04-10-2005, 02:49 PM
For instance, i created a user and set it with a last activity to April 2004 (so 1 year ago), I executed the operation and it was showing up between the "skipped users". There are no "flagged" users in the operation log, only skipped ones. I am running this with e-mail alert, and did not receive any mail at all. Any ideas?
Revan
04-10-2005, 04:07 PM
Hm damn, I made a silly mistake.
Find:
else if (!isset($members['deleflag']))
Replace with:
else if (!$members['deleflag'])
:)
Ala21
04-10-2005, 04:15 PM
Great, now the flagging works. Thank you *installed*
Thanks people :)
When I get home I will further improve this hack, by flagging the users for deletion, emailing them about the fate of their accounts, then after x amount of days (config), if the user still applies to the "flagged for deletion" groups, delete them (and optionally mail them about it).
This would be very very welcome .. I used to have Amy's excellent hack (https://vborg.vbsupport.ru/showthread.php?t=48964) for vB2, so yours might be a good heir to that throne. Any update on your progress so far? Will install immediately once these features are incorporated.
laborer75
04-11-2005, 11:39 PM
Thanks people :)
When I get home I will further improve this hack, by flagging the users for deletion, emailing them about the fate of their accounts, then after x amount of days (config), if the user still applies to the "flagged for deletion" groups, delete them (and optionally mail them about it).
I too would love to see these options. Then you can warn them and give them so many days to get thier a*ses in gear and post before removing them completely. Then after x amount of days they have been warned, an email telling them they suck. LOL. Hope to see this happen soon. Would love to install this hack....
Revan
04-12-2005, 07:09 AM
This would be very very welcome .. I used to have Amy's excellent hack (https://vborg.vbsupport.ru/showthread.php?t=48964) for vB2, so yours might be a good heir to that throne. Any update on your progress so far? Will install immediately once these features are incorporated.
I too would love to see these options. Then you can warn them and give them so many days to get thier a*ses in gear and post before removing them completely. Then after x amount of days they have been warned, an email telling them they suck. LOL. Hope to see this happen soon. Would love to install this hack....
What this hack does:
[...]
Has x or fewer posts (0 by default)
AND
Has been flagged for deletion earlier than x days (15 by default)
Nuff said ;)
Dave-G
05-17-2005, 12:20 PM
Rather than deleting, is it possible to simply move them to another group?
So you'd have two options:
1. notify via email, add to a list, delete.
2. notify via email, add to a list, move to another group.
Revan
05-17-2005, 04:34 PM
I wrote some quick code which I think will work, let me know if it doesn't work and/or left some statistic on the forum un-updated :)
Thx,
I have made an addon on this, so you can exclude usergroups from been pruned,
you can find it here: https://vborg.vbsupport.ru/showthread.php?t=91159
I finally installed this hack, but you forgot one big thing: the deleteflag isn't unset when the user decides to visit the forum again. It will be set forever for that user. Thanks for the great hack, hope this will be solved.
Moreover, I've improved the performance of this script by editing the datatype of the 'deleflag' column to unsigned int (10). This is quite dangerous, as the default value is 0. Therefore the script needs to be modified a little:
if ($members['deleflag'] <= (TIMENOW - ($flaggedtime * 86400)) AND !empty($members['deleflag']))
to
if ($members['deleflag'] <= (TIMENOW - ($flaggedtime * 86400)) AND $members['deleflag'] > 0)
and
else if (!$members['deleflag'])
to
else if ($members['deleflag'] == 0)
brfrankl
07-31-2007, 07:54 PM
anyone know if this works with 3.6.7??
slowphantom
04-29-2008, 05:05 PM
nice mod thx
but is there a way to do not remove user
i was thinking to just move it to another group
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.