Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-17-2000 Last Update: Never Installs: 0
 
No support by the author.

Mass Delete old users/Mass Email inactive users.

I would like a way to do the above. Perhaps a way to email all users that havent visited in x days, and tell them to do so. If they do not send another email x days later to tell them they will need to visit in x days or acct will be deleted then in x days delete it.

Just a thought. I know I have a lot of users that sign up and forget to come back lol.

For example say once every ten days you clean up your board. First time you email all people that have not posted in say 30 days. 10 Days later you email everyone that hasnt visited in 40 days telling them that if they still wish to be a member to log in (send url) then ten days later purge who ever hasnt logged in after second email.

See what I mean?

-Brian

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-18-2000, 12:44 AM
Guest
 
Posts: n/a
Default

Yup - I'll have a think about that one!

John
Reply With Quote
  #3  
Old 05-27-2000, 01:12 AM
Guest
 
Posts: n/a
Default

[B]Mass Delete old users/Mass Email inactive users.

I need this feature too for my classes which change every semester
Reply With Quote
  #4  
Old 07-14-2000, 07:43 PM
Guest
 
Posts: n/a
Default

Has anyone worked on this? I would love to see a feature like this.
Reply With Quote
  #5  
Old 07-14-2000, 08:45 PM
Guest
 
Posts: n/a
Default

I like this idea! Definitely a thing to code/hack in the future.
Reply With Quote
  #6  
Old 07-31-2000, 02:35 AM
Guest
 
Posts: n/a
Default

has anyone come up with this yet?
Reply With Quote
  #7  
Old 07-31-2000, 10:51 PM
Guest
 
Posts: n/a
Default

Ok,

I have been working on the remove old members hack but I know I am doing something wrong here.

Here is what I have:

if ($action=="joindates") {

echo "<p>Remove by length of membership</p>\n";
echo doformheader("thread","doremovejoindate");
echo "<table border=0>";
echo makeinputcode("Delete accounts older than x days:","joindateremove","");
echo makeinputcode("Number of Posts:","joinpostsremove","");
echo doformfooter("Submit");

exit;

}

if ($action=="doremovejoindate") {

echo "<p>Deleting...</p>";

$datecut=time()+($joindateremove*86400);
$postcut=$DB_site->query("SELECT joindate FROM user WHERE joindate=$datecut");
$postcuts=$postcut[joindate];
if ($joinpostsremove<=2 AND $postcuts=$datecut) {
$DB_site->query("DELETE FROM user WHERE joindate=$datecut");
$DB_site->query("DELETE FROM user WHERE posts<=$joinpostsremove");
echo "<p>Accounts removed successfully! It is recommend that you <a href=\"misc.php\">update counters</a> now.</p>";

} else {

echo "<p>No Members match this criteria. Click <a href=\"index.php\">here</a> to return to the admin index page.</p>";

}
}

What I am trying to do is to remove only those members that are the number of days old that you input into the text box and also meet the number of posts requirement.

I set this to <=2 but would like for the script to look at the $joinpostsremove input and work off that.

The above is just where I got to and would like for some of you code warriors to look it over and add anything that you think is necessary so that you can put in correct code to delete members that are over X number of days old and have X number of posts. They should meet both criteria or you get the "No Members match......." message.

Thanks,
Parker
Reply With Quote
  #8  
Old 08-01-2000, 12:59 AM
Guest
 
Posts: n/a
Default

Hmm.. this is completely untested, and I dunno if it'll work:

Code:
if ($action=="joindates") { 

echo "<p>Remove by length of membership</p>\n"; 
echo doformheader("thread","doremovejoindate"); 
echo "<table border=0>"; 
echo makeinputcode("Delete accounts older than x days:","joindateremove",""); 
echo makeinputcode("Number of Posts:","joinpostsremove",""); 
echo doformfooter("Submit"); 

exit; 

} #end joindates

if ($action=="doremovejoindate") { 

echo "<p>Deleting...</p>";
if (!is_int($joinpostsremove) and !is_int($joindateremove)) {
	echo "Invalid entries.";
	exit;
}
$datecut=time()+($joindateremove*86400); 
if($cuts=$DB_site->query("SELECT username,userid FROM user WHERE (joindate<=$datecut AND posts<=$joinpostsremove)")) { 
	while($user=$DB_site->fetch_array($cuts)) {
		$DB_site->query("DELETE FROM user WHERE userid=$user[userid]");
		echo "$user[username] deleted...<BR>";
	}
	echo "<p>Accounts removed successfully! It is recommend that you <a href=\"misc.php\">update counters</a> now.</p>"; 
} else { 
	echo "<p>No Members match this criteria. Click <a href=\"index.php\">here</a> to return to the admin index page.</p>"; 
}
 
} #end doremovejoindate
HTH,
Reply With Quote
  #9  
Old 08-01-2000, 01:45 AM
Guest
 
Posts: n/a
Default

Ed:

Thanks for looking at this.

I keep getting the "Invalid Entries" line whenever I put any number in either place. So if I put in 365 for the number of days and 1 for the number of posts then I get the "Invalid Entries" line.

Also, I am not sure now that the script uses 86,400 as the number to use for calculation of the sign up date. In the import.php file it uses:

if ( ereg( "([0-9]{1,2})-([0-9]{1,2})-([0-9]{2,4})", $userinfo[datejoined], $regs ) ) {
$datejoined=mktime(0,0,0,$regs[1],$regs[2],$regs[3])-($timeoffset)*3600;
} else {
$datejoined=time();
}

Any ideas?

BTW, what does this do?:

if (!is_int($joinpostsremove) and !is_int($joindateremove))

Thanks,
Parker

[Edited by Parker Clack on 07-31-2000 at 11:34 PM]
Reply With Quote
  #10  
Old 08-01-2000, 03:36 AM
Guest
 
Posts: n/a
Default

Hmm... not sure why that invalid entries thing wasn't working. It was just to make sure the user entered an integer in both fields. Oh well, I just changed it up a little, but not it does a little bit different function

Code:
if ($action=="joindates") { 

echo "<p>Remove by length of membership</p>\n"; 
echo doformheader("thread","doremovejoindate"); 
echo "<table border=0>"; 
echo makeinputcode("Delete accounts older than x days:","joindateremove",""); 
echo makeinputcode("Number of Posts:","joinpostsremove",""); 
echo doformfooter("Submit"); 

exit; 

} #end joindates

if ($action=="doremovejoindate") { 

echo "<p>Deleting...</p>";
if (!$joinpostsremove and !$joindateremove) {
	echo "You didn't fill in a required field.";
	exit;
        //Another note since I'm thinking about it: this might not work either. I'm not sure if a "0" returns as false - try it.
}
$datecut=time()+($joindateremove*86400); 
if($cuts=$DB_site->query("SELECT username,userid FROM user WHERE (joindate<=$datecut AND posts<=$joinpostsremove)")) { 
	while($user=$DB_site->fetch_array($cuts)) {
		$DB_site->query("DELETE FROM user WHERE userid=$user[userid]");
		echo "$user[username] deleted...<BR>";
	}
	echo "<p>Accounts removed successfully! It is recommend that you <a href=\"misc.php\">update counters</a> now.</p>"; 
} else { 
	echo "<p>No Members match this criteria. Click <a href=\"index.php\">here</a> to return to the admin index page.</p>"; 
}
 
} #end doremovejoindate
About 86,400: that's correct. The users registration date/time is stored as a unix timestamp, or seconds since Jan 1, 1970 (?). Since there are 86,400 seconds in a day, 365*86,400 would equal one year in seconds.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:16 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.04306 seconds
  • Memory Usage 2,276KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete