Version: 2.5.2, by sabret00the
Developer Last Online: Apr 2010
Version: 3.0.1
Rating:
Released: 06-03-2004
Last Update: 04-21-2005
Installs: 36
No support by the author.
although i know this works manually, it's untested via cron
Quote:
Originally Posted by AmyKhar
This hack will email a warning to members who have not activated their account and then delete them. It can run via cron, and is a pretty darn easy hack to install.
Features:
1. Emails users after 3 days and reminds them to activate their accounts.
2. Emails users after 5 days and lets them know their account will be deleted if they do not activate.
3. Emails users after 8 days with a final warning.
4. Deletes un-activated members after 10 days.
it still does exactly the same but this time for vb3
oh yeah, it emails you to tell you who was deleted, emailed so you're always informed.
if you got a big board you can't live without this, it stops the crap from piling up.
anything messes up, i can't take responsibility i'm afraid so back up before you try it.
#########################################
Add-On:
#########################################
if you like your templates in your admin cp neat then do this:
in "includes/adminfunctions_template.php" find
now save and close cos you're done :cheeky: :bored:
[high]wol stuff been removed due to the fact this should now be in the cron directory and thus won't show up anyway[/high]
and now like the days of our youth where everything was free and our mum would have dinner on the table for us, you're done.
[high]this was a fantastic vb2 hack and was made with blood, sweat and tears by Amy, she deserves all the credit for doing a fantastic job and then giving me permission to release this, so please if you install this should your gratitude in her direction as without her it would've been impossible.
the two critical bugs that a/ it wasn't sending the activationid and b/ it was deleting users who didn't change their email correctly, have been squashed by Psico[/high]
v2.1: Boofo killed 2 bugs
v2.2: more bugs killed by Boofo
v2.3: bugs killed by psico
v2.3a: bugs killed by sv1cec
v2.4: changed activation code when one exists already removed (sv1cec)
v2.4: better cron logging (me)
v2.4: table prefix bug found by jlurken, fixed by moi
v2.5: email reminder sent to your inbox thanks to sv1vec, improved logging, removed redundant code.
v2.5.2: fixed table prefixes.
[high]YOU WILL NOW NEED TO EDIT THE FILE TO MAKE SURE IT WORKS, IT'S CLEARLY MARKED ON LINE 21[/high]
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
but it is not clearn the member has none active after 10 days from reg date
you have any idea
i tried to run manual (by click run now button)
and i got this message
Manage Activation
Done
that's all
i check my member list they still there
sorry guy i really don't know what wrong with it
Here is my slightly modified version of the manageactivation.php file. The difference is that at the end, the script sends you a consolidated report, on its actions. To whom it send a message, and for which period (3-days, 5-days, 8 days, or who were deleted).
Maybe you find it useful.
Rgds
PHP Code:
<?php
// version 2.3a updated instructions urghh
// ## Error Reporting ( we use error reporting in php so we can control the display of error messages
// ## we will use this because all vBulletin files follow the same error reporting rules) ##
error_reporting(E_ALL & ~E_NOTICE);
// ## this action here cache's the templates so that everytime their needed a querry wont be needed to run
// ## the names in there are just the template names :), there must be a comma after everyone but the last ##
// ## Grabs global.php this grabs vbulletins global.php so we can use the most basic of vBulletins functions ##
require_once('./global.php');
// Get all users who have not activated their accounts.
$userArray=$DB_site->query("
SELECT username,user.userid,email,joindate,activationid
FROM user
LEFT JOIN useractivation ON (user.userid=useractivation.userid)
WHERE user.usergroupid=3 AND user.posts = 0
");
while ($user=$DB_site->fetch_array($userArray))
{
// make random number
if (empty($user['activationid']))
{ //none exists so create one
$user['activationid'] = vbrand(0, 100000000);
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "useractivation
VALUES
(NULL , $user[userid], " . TIMENOW . ", $user[activationid], 0, 2)
");
echo ("ActivationID created for ". $user[username]."<br>");
}
// Email users who have not activated after 3 days.
if ($day>2 AND $day<4)
{
eval("\$subject = \"".fetch_template("ActivationEmail_v2_Subject")."\";");
eval("\$message = \"".fetch_template("ActivationEmail_v2_Message3")."\";");
mail ($email,$subject,$message,"From: \"$vboptions[bbtitle] Mailer\" <$vboptions[webmasteremail]>");
$threedayemail['$userid'] = "$username (UID: $userid), e-mail address: $email, Activation Code: $activateid";
}
// Email users who have not activated after 5 days.
elseif ($day>4 AND $day<6)
{
eval("\$subject = \"".fetch_template("ActivationEmail_v2_Subject")."\";");
eval("\$message = \"".fetch_template("ActivationEmail_v2_Message5")."\";");
mail ($email,$subject,$message,"From: \"$vboptions[bbtitle] Mailer\" <$vboptions[webmasteremail]>");
$fivedayemail['$userid'] = "$username (UID: $userid), e-mail address: $email, Activation Code: $activateid";
}
// Email users who have not activated after 8 days.
elseif ($day>7 AND $day<9)
{
eval("\$subject = \"".fetch_template("ActivationEmail_v2_Subject")."\";");
eval("\$message = \"".fetch_template("ActivationEmail_v2_Message8")."\";");
mail ($email,$subject,$message,"From: \"$vboptions[bbtitle] Mailer\" <$vboptions[webmasteremail]>");
$eightdayemail['$userid'] = "$username (UID: $userid), e-mail address: $email, Activation Code: $activateid";
}
// Delete users.
elseif ($day>10)
{
$DB_site->query("UPDATE post SET username='".addslashes($username)."',userid=0 WHERE userid='$userid'");
$DB_site->query("DELETE FROM user WHERE userid='$userid'");
$DB_site->query("DELETE FROM userfield WHERE userid='$userid'");
$DB_site->query("DELETE FROM usertextfield WHERE userid='$userid'");
$DB_site->query("DELETE FROM access WHERE userid='$userid'");
// $DB_site->query("DELETE FROM calendar_events WHERE userid='$userid'");
$DB_site->query("DELETE FROM customavatar WHERE userid='$userid'");
$DB_site->query("DELETE FROM moderator WHERE userid='$userid'");
$DB_site->query("DELETE FROM pm WHERE userid='$userid'");
$DB_site->query("DELETE FROM subscribeforum WHERE userid='$userid'");
$DB_site->query("DELETE FROM subscribethread WHERE userid='$userid'");
$DB_site->query("DELETE FROM session WHERE userid='$userid'");
eval("\$subject = \"".fetch_template("ActivationEmail_v2_DeletedSubject")."\";");
eval("\$message = \"".fetch_template("ActivationEmail_v2_DeletedMessage")."\";");
mail ($email,$subject,$message,"From: \"$vboptions[bbtitle] Mailer\" <$vboptions[webmasteremail]>");
$deletedusers['$userid'] = "$username (UID: $userid), e-mail address: $email, Activation Code: $activateid";
}
}
if ($threedayemail!='')
{
$threeday = implode("\n ", $threedayemail);
}
if ($fivedayemail!='')
{
$fiveday = implode("\n ", $fivedayemail);
}
if ($eightdayemail!='')
{
$eightday = implode("\n ", $eightdayemail);
}
if ($deletedusers!='')
{
$deleted = implode("\n ", $deletedusers);
}
if (!$threeday)
{
$threeday = "None";
}
if (!$fiveday)
{
$fiveday = "None";
}
if (!$eightday)
{
$eightday = "None";
}
if (!$deleted)
{
$deleted = "No one was deleted";
}
$logmessage = "Activation Reminder Script run on $date at $time. \n \n 3 Day Reminder Sent To: \n $threeday \n \n 5 Day Reminder Sent To: \n $fiveday \n \n 8 Day Reminder Sent To: \n $eightday \n \n Deleted Users: \n $deleted";
mail ($vboptions[webmasteremail],"Activation Reminder Report (Activation Notification)",$logmessage,"From: \"$vboptions[bbtitle] Mailer\" <$vboptions[webmasteremail]>");
tbh you've just lost me, what does it say in your scheduled tasks log?
it said
manageActivation Complete; 3 Day Reminder Sent To: None. 5 Day Reminder Sent To: None. 8 Day Reminder Sent To: None. Users Deleted: No one was deleted.
depends on what your board is trying to do with them users, but it's mostly taking up space it don't need to be.
i saw a post by someone the other day that said they had 200 members unconfirmed, to think something like this could've seduced em into completing their registration.
1200 unconfirmed users on my site. 12,000 total. site been up 2 months. so I think this is a good idea.
so this error from what you see here deleted something or what? I have no idea if you ask me. Somebody got delted. can you upload your version as an attachment? thanks.