vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Automatic Inactive Users Pruning (https://vborg.vbsupport.ru/showthread.php?t=78952)

Revan 03-27-2005 10:00 PM

Automatic Inactive Users Pruning
 
As requested by Watson here.

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* :)

Reef 03-29-2005 06:16 PM

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:
PHP Code:

else if (!isset($members['deleflag'])) 

Replace with:
PHP Code:

else if (!$members['deleflag']) 

:)

Ala21 04-10-2005 04:15 PM

Great, now the flagging works. Thank you *installed*

djr 04-11-2005 07:40 PM

Quote:

Originally Posted by Revan
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 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

Quote:

Originally Posted by Revan
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

Quote:

Originally Posted by djr
This would be very very welcome .. I used to have Amy's excellent hack 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.

Quote:

Originally Posted by laborer75
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....

Quote:

Originally Posted by Revan
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 :)

waza 06-27-2005 07:25 AM

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

djr 07-25-2005 10:23 PM

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:

PHP Code:

 if ($members['deleflag'] <= (TIMENOW - ($flaggedtime 86400)) AND !empty($members['deleflag'])) 

to
PHP Code:

 if ($members['deleflag'] <= (TIMENOW - ($flaggedtime 86400)) AND $members['deleflag'] > 0

and
PHP Code:

 else if (!$members['deleflag']) 

to
PHP Code:

 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


All times are GMT. The time now is 04:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01208 seconds
  • Memory Usage 1,768KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete