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)
-   -   Un-Activated User Management (https://vborg.vbsupport.ru/showthread.php?t=65845)

sabret00the 12-21-2004 12:59 PM

tbh you've just lost me, what does it say in your scheduled tasks log?

sv1cec 12-21-2004 01:25 PM

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);
    
?>


qhoa 12-21-2004 02:15 PM

thanks sv1cec
i'll try it and hope it solve my problem
again thanks

qhoa 12-21-2004 02:16 PM

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.

nubian 12-25-2004 10:26 PM

what is the significant difference between 2.3b and 2.4?
is it only the manageActivation.php?

sabret00the 12-26-2004 07:23 AM

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.

T3MEDIA 12-26-2004 11:54 AM

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.

T3MEDIA 12-26-2004 07:59 PM

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.

sabret00the 12-26-2004 08:09 PM

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.)

T3MEDIA 12-26-2004 08:21 PM

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.

sabret00the 12-26-2004 08:37 PM

check the mod post (one at the top of each page)

sabret00the 12-26-2004 08:39 PM

hack updated btw :)

nubian 01-05-2005 10:58 AM

what is the significant difference from 2.4 to 2.5? is it only the manageActivation.php file?

also when mulitple users are deleted, when i go into the scheduled task to see the log, it doesn't seprate the members names of who were deleted:
for example:

manageActivation Complete; 3 Day Reminder Sent To: None. 5 Day Reminder Sent To: activation_rem_testLUCKEYBERNIEsplasher78poopypant s. 8 Day Reminder Sent To: None. Users Deleted: peewee8090.

sabret00the 01-05-2005 11:02 AM

Quote:

Originally Posted by nubian
what is the significant difference from 2.4 to 2.5? is it only the manageActivation.php file?

also when mulitple users are deleted, when i go into the scheduled task to see the log, it doesn't seprate the members names of who were deleted:
for example:

manageActivation Complete; 3 Day Reminder Sent To: None. 5 Day Reminder Sent To: activation_rem_testLUCKEYBERNIEsplasher78poopypant s. 8 Day Reminder Sent To: None. Users Deleted: peewee8090.

yes the only file this will ever change is the manageActivation.php and that error is fixed in 2.5 but i got a fix for something else pretty insignificant in 2.5.1 which will be out later today.

jluerken 01-05-2005 09:49 PM

Quote:

Originally Posted by sabret00the
yes the only file this will ever change is the manageActivation.php and that error is fixed in 2.5 but i got a fix for something else pretty insignificant in 2.5.1 which will be out later today.

I'll refresh every hour :D
Please include also update info in the new archive.

jluerken 01-07-2005 09:23 AM

Quote:

Originally Posted by sabret00the
yes the only file this will ever change is the manageActivation.php and that error is fixed in 2.5 but i got a fix for something else pretty insignificant in 2.5.1 which will be out later today.

Any news about this?

sabret00the 01-07-2005 09:40 AM

done, not tested it as it was a minor fix that won't make much of a difference but if it works i'll send the update email tonight, you can get the updated version from the mod post :)

nubian 01-09-2005 03:57 AM

is this hack 3.0.5 compliant?

sabret00the 01-09-2005 06:54 AM

yes it is.

nubian 01-17-2005 10:04 PM

you have 2 setups of your hack in your lastest zip...
there's a dir called "2.5" and hack also reside in that root directory.
which one is 2.5.1?

also i noticed that your hack sends email from the main forums email address.
this could very well clutter someone email box unless they check their main forums email box from time to time.
what can i do so that it sends the email to another email address?

thanks

sabret00the 01-17-2005 10:16 PM

go for the one in the subfolder, it seems to have the newest modify date on the php file.

nubian 01-17-2005 10:37 PM

any idea on my second question?
thanks

nubian 01-20-2005 10:05 AM

bump

sabret00the 01-20-2005 10:08 AM

don't get what you mean by the second question

nubian 01-20-2005 10:15 AM

Quote:

Originally Posted by sabret00the
don't get what you mean by the second question

i get these emails under my forums email account:

manageActivation Complete;
3 Day Reminder Sent To: None.

5 Day Reminder Sent To: jimjohnson.

8 Day Reminder Sent To: tom22222, mrmeezy, Mexkeebler.

Users Deleted: No one was deleted.

how can i send this to another email address or how can i disable it?

sabret00the 01-20-2005 10:21 AM

ahhhh that, to do that

find
PHP Code:

vbmail($vboptions[webmasteremail],"Activation Reminder Report (Activation Notification)",$logmessage,"From: \"$vboptions[bbtitle]\" <$vboptions[webmasteremail]>"); 

and replace with
PHP Code:

//vbmail($vboptions[webmasteremail],"Activation Reminder Report (Activation Notification)",$logmessage,"From: \"$vboptions[bbtitle]\" <$vboptions[webmasteremail]>"); 


Jack Jones 02-03-2005 10:28 AM

I've installed this and it is functioning perfectly. Except that when it sends the email its sending around 19/20 of the exact same email.

Any ideas why ?

sabret00the 02-03-2005 10:32 AM

Quote:

Originally Posted by Jack Jones
I've installed this and it is functioning perfectly. Except that when it sends the email its sending around 19/20 of the exact same email.

Any ideas why ?

what email is it sending so many versions of?

Jack Jones 02-03-2005 10:36 AM

Activation Reminder Report (Activation Notification).

Being sent to me (as forum admin) but also a member complained they got it 15 times also.

sabret00the 02-03-2005 11:06 AM

how many times are you receiving the action notification per day?

Jack Jones 02-03-2005 11:16 AM

I'm receiving one batch per day. Around 15 emails in the space of 15 minutes.

Jack Jones 02-05-2005 09:57 AM

This is still happening. Any ideas? Please.

kall 02-19-2005 05:48 PM

Quote:

Originally Posted by 006
What's the downside to having a large amount of unactive members saved?

Odd...

Quote:

3 Day Reminder Sent To: zigza.
The username is actually zigzag.

No other problems tho. :)

sabret00the 02-19-2005 05:57 PM

Quote:

Originally Posted by Jack Jones
This is still happening. Any ideas? Please.

sorry been busy on another project, i have no idea what's going wrong and no ideas on how to fix it.

Quote:

Originally Posted by Originally Posted by 006
What's the downside to having a large amount of unactive members saved?

just using up db space for no reason.

Quote:

Originally Posted by kall
The username is actually zigzag.

No other problems tho.

i think i fixed that problem in the latest zip?

kall 02-19-2005 06:33 PM

Alrighty, I might not have uploaded the activation.php file.

It doesn't always happen, this is the first time I have noticed it actually. :)

As for the problem of the 15 emails...Is it possible to accidentally double-up on scheduled tasks...through upgrades or anything, like how you can have hidden smilie categories that only appear when you Add a new category? (In the db already, but not tagged to appear in another table?)

kall 02-19-2005 06:38 PM

Oh, so do we use the .php file with $deletedusers = substr($deletedusers,0,-3); or $deletedusers = substr($deletedusers,0,-2); ?

Eagle Creek 02-28-2005 11:14 PM

Is it full 3.0.7 compatible?

T3MEDIA 03-01-2005 04:37 AM

would LOVE a add on that would check to see if the deleted user has a photopost folder and delete that as well.

sabret00the 03-01-2005 08:27 AM

Quote:

Originally Posted by kall
Oh, so do we use the .php file with $deletedusers = substr($deletedusers,0,-3); or $deletedusers = substr($deletedusers,0,-2); ?

you're meant to be using the 0.2 one.

Quote:

Originally Posted by Eagle Creek
Is it full 3.0.7 compatible?

it is indeed.

Eagle Creek 03-01-2005 11:39 AM

Quote:

Originally Posted by sabret00the
you're meant to be using the 0.2 one.


it is indeed.

Nice, thx.


All times are GMT. The time now is 02:21 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.01567 seconds
  • Memory Usage 1,908KB
  • 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
  • (3)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete