Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Un-Activated User Management Details »»
Un-Activated User Management
Version: 2.5.2, by sabret00the sabret00the is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

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
PHP Code:
    'subscription' => $vbphrase['group_paid_subscriptions'], 
add below
PHP Code:
    'activationemail' => ActivationEmail
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.

Comments
  #122  
Old 12-21-2004, 12:59 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tbh you've just lost me, what does it say in your scheduled tasks log?
Reply With Quote
  #123  
Old 12-21-2004, 01:25 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by qhoa
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 ##

//$globaltemplates = array(
//    'ActivationEmail_v2_Subject',
//    'ActivationEmail_v2_Message3',
//    'ActivationEmail_v2_Message5',
//    'ActivationEmail_v2_Message8',
//);
//

// ## 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(0100000000);
                    
$DB_site->query("
                            INSERT INTO " 
TABLE_PREFIX "useractivation
                            VALUES
                            (NULL , 
$user[userid], " TIMENOW ", $user[activationid], 0, 2)
                    "
);
                    echo (
"ActivationID created for "$user[username]."<br>");
            }

        
// Calculate days since joining
        
$currentday time();
        
$day intval(($currentday $user[joindate])/(60*60*24));
        
$username $user[username];
        
$activateid  $user[activationid];
        
$userid $user[userid];
        
$email $user[email];
       
        
// Email users who have not activated after 3 days.
        
if ($day>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>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>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";
    }

$date vbdate $vboptions['dateformat'], TIMENOW ) ;
$time vbdate $vboptions['timeformat'], TIMENOW ) ;
    
$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]>");

log_cron_action($logmessage$nextitem);
    
?>
Reply With Quote
  #124  
Old 12-21-2004, 02:15 PM
qhoa qhoa is offline
 
Join Date: Jul 2004
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks sv1cec
i'll try it and hope it solve my problem
again thanks
Reply With Quote
  #125  
Old 12-21-2004, 02:16 PM
qhoa qhoa is offline
 
Join Date: Jul 2004
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sabret00the
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.
Reply With Quote
  #126  
Old 12-25-2004, 10:26 PM
nubian nubian is offline
 
Join Date: Nov 2004
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what is the significant difference between 2.3b and 2.4?
is it only the manageActivation.php?
Reply With Quote
  #127  
Old 12-26-2004, 07:23 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nubian
what is the significant difference between 2.3b and 2.4?
is it only the manageActivation.php?
yup that's the only thing that'll change.
Reply With Quote
  #128  
Old 12-26-2004, 11:54 AM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sabret00the
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.
Reply With Quote
  #129  
Old 12-26-2004, 07:59 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Shy about 2,000 users and I got this error.

Quote:
Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT postid, thread.title, post.dateline , IF(thread.views=0, thread.replycount+1, thread.views) as views, thread.replycount, thread.votenum, thread.votetotal

FROM myvb3_post AS post
INNER JOIN myvb3_thread AS thread ON(thread.threadid = post.threadid)
LEFT JOIN myvb3_deletionlog AS delthread ON(delthread.primaryid = post.threadid AND delthread.type = 'thread')
LEFT JOIN myvb3_deletionlog AS delpost ON(delpost.primaryid = post.postid AND delpost.type = 'post')
WHERE (postid IN(151, 152, 167, 177, 182, 191, 196, 202, 206, 207, 208, 215, 216, 217, 218, 226, 229, 234, 239, 240, 242, 340, 342, 403, 472, 473, 477, 1488, 1490, 1908, 1910, 1917, 2200, 3048, 3140) OR postid IN()) AND post.dateline > 1104093229 AND thread.replycount >= 1
AND delthread.primaryid IS NULL
AND delpost.primaryid IS NULL
AND post.visible = 1


mysql error: You have an error in your SQL syntax near ')) AND post.dateline > 1104093229 AND thread.replycount >= 1
AND delthread.pr' at line 8

mysql error number: 1064
and I got this in email.

Quote:
Activation Reminder Script run on 12-26-2004 at 04:26 PM.

3 Day Reminder Sent To:
None

5 Day Reminder Sent To:
None

8 Day Reminder Sent To:
None

Deleted Users:
No one was deleted
I used the php version that was in the fourm here that had a more detailed output.

Please and thank you.
Reply With Quote
  #130  
Old 12-26-2004, 08:09 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by T3MEDIA
Shy about 2,000 users and I got this error.



and I got this in email.



I used the php version that was in the fourm here that had a more detailed output.

Please and thank you.
i can't see that query in neither sv1vec's nor my version, i suggest downloading the stock version and checking the instructions.

also that should delete atleast around 1800 of your 2000 unconfirmed members (just a guess but i'm guessing their more than 10 days old.)
Reply With Quote
  #131  
Old 12-26-2004, 08:21 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 12:04 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.04732 seconds
  • Memory Usage 2,401KB
  • 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
  • (3)bbcode_php
  • (8)bbcode_quote
  • (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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • postbit_imicons
  • 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