Log in

View Full Version : Un-Activated User Management


sabret00the
06-03-2004, 10:00 PM
although i know this works manually, it's untested via cron

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 :D

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
'subscription' => $vbphrase['group_paid_subscriptions'],
add below
'activationemail' => ActivationEmail,
now save and close cos you're done :cheeky: :bored:

wol stuff been removed due to the fact this should now be in the cron directory and thus won't show up anyway

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.

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

v2.1: Boofo killed 2 bugs :D
v2.2: more bugs killed by Boofo :D :D
v2.3: bugs killed by psico :D :D :D
v2.3a: bugs killed by sv1cec :D :D :D :D
v2.4: changed activation code when one exists already removed (sv1cec) :D :D :D :D :D
v2.4: better cron logging (me) :D :D :D :D :D :D
v2.4: table prefix bug found by jlurken, fixed by moi :D :D :D :D :D :D :D
v2.5: email reminder sent to your inbox thanks to sv1vec, improved logging, removed redundant code. :D :D :D :D :D :D :D :D
v2.5.2: fixed table prefixes. :D :D :D :D :D :D :D :D :D


YOU WILL NOW NEED TO EDIT THE FILE TO MAKE SURE IT WORKS, IT'S CLEARLY MARKED ON LINE 21

007
06-04-2004, 10:12 PM
What's the downside to having a large amount of unactive members saved?

sabret00the
06-04-2004, 10:15 PM
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.

SaN-DeeP
06-04-2004, 10:25 PM
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.
nice hack i will install this.

i dunt like unactive members
its kinda waste or no use for board at all.

Sandy...

ImportPassion
06-05-2004, 02:51 PM
you know this is already in vb3 right by default, right? albeit not exactly the same, but you could just hack the existing one.

sabret00the
06-05-2004, 04:25 PM
yup, noticed last night and thought asked for it be removed, read their version and thought this would make a nice alternative as does remove the users after said amount of days

Boofo
06-05-2004, 05:15 PM
Paul, I have this set up to use vB3's cron and it works great. PM me on my site and I will give you the updated file and what you need for this. ;)

Dan
06-05-2004, 06:16 PM
Paul, I have this set up to use vB3's cron and it works great. PM me on my site and I will give you the updated file and what you need for this. ;)
Nice :) I like the idea of this

lifesourcerec
06-05-2004, 07:18 PM
Paul, I have this set up to use vB3's cron and it works great. PM me on my site and I will give you the updated file and what you need for this. ;)

How do I do that?

PixelFx
06-05-2004, 09:52 PM
very nice, *looks over at list of 400 new unchecked accounts* I think I could use this ;)

sabret00the
06-06-2004, 03:17 AM
it's 5am, i'm still at work, but i'll talk to bob in the morning and update the neccessary files as soon as i wake up tomorrow.

lifesourcerec
06-06-2004, 03:59 PM
Sounds good :)

Bryan Ex
06-06-2004, 04:27 PM
If I install this (I'm really tired of pruning manually!) will it double up the activation reminders that are already being sent out by VB3?

sabret00the
06-06-2004, 04:31 PM
if you install this, you're best to disable the one built into vbulletin, but i would wait a while cos i'm going to update this by end of weekend.

Bryan Ex
06-06-2004, 04:33 PM
Perfect! Just out of curiousity... is the update for bug fixes ... or additions to what you've already posted?

Bryan Ex
06-07-2004, 11:27 AM
although i know this works manually, it's untested via cron
Is this still the case and/or will it run off the VB cron?

sabret00the
06-07-2004, 10:36 PM
just updated this upto version 2.2 thanks to Boofo, so please if you're gonna show gratitude, show it to both them.

to upgrade all you have to do is replace the managaActivation.php

anyhoo not to good at this whole release stuff so have fun with it :)

instructions on how to run under the vb cron system are in the installation file.

lifesourcerec
06-07-2004, 11:05 PM
Where do you add the password at in this file?

sabret00the
06-07-2004, 11:08 PM
you actually don't need to do that bit anymore, sorry should've removed that bit from the instructions

psico
06-08-2004, 01:39 AM
you actually don't need to do that bit anymore, sorry should've removed that bit from the instructions
What happend if a user change his email and make a mistake? This user would lost his account in ten days??
I think this hack have to check if this user is a new registration or an email change, for obvious reasons ;)

Great hack dude!

sabret00the
06-08-2004, 05:56 AM
What happend if a user change his email and make a mistake? This user would lost his account in ten days??sadly yes, however feel free to add the functionality you require.

PranK
06-08-2004, 06:05 AM
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.

I got close to 1000... :(

Thanks heaps for this, its great!

Christian

Yahhoon23
06-08-2004, 06:29 AM
What happend if a user change his email and make a mistake? This user would lost his account in ten days??
I think this hack have to check if this user is a new registration or an email change, for obvious reasons ;)

Great hack dude!

Anyone have any info on how to accomplish this. You are right that it should check, but my skills in vb aren't good enough to do this without help :(

sabret00the
06-08-2004, 06:36 AM
at a quick glance you'd need to edit this
$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
");
make it select the posts column as well and then include the clause to say


WHERE user.usergroupid=3
AND posts > 1 i'll take a proper loook when i wake up, as right now i need a little sleep

Bryan Ex
06-08-2004, 06:38 AM
Maybe I'm not following the process here but would it not allow for 10 ten days for correction? While it's certainly possible to loose an occasional member, if they are even semi-active they will know they did not receive the activation notice, the usergroup permissions would not have changed to allow regular member access, plus they would have to make the same exact error in their email address twice to change it. Just seems like pretty slim odds to me.

Bryan Ex
06-14-2004, 02:18 PM
User activationid's are not being included in the email notices for my board. Is this query correct as there is no activationid field in the user table;

SELECT username,user.userid,email,joindate,activationid
FROM user
LEFT JOIN useractivation ON (user.userid=useractivation.userid)
WHERE user.usergroupid=3

sabret00the
06-15-2004, 07:04 AM
i'm looking into this now, the query is correct as it pulls the column correctly but it's just coming up null, i should have an update by the end of the day.

Bryan Ex
06-15-2004, 07:43 AM
Okay... cool. The other thing I was wondering about is it doesn't seem to list in the cron log files unless I run it manually. It's certainly working as I have no unactivated accounts over the time limit... just no logs to indicate it. Anything that I would need to change to have it running from my includes/cron/ directory? I compared log_cron_action to another script that was being logged and they seem the same to me.

psico
07-21-2004, 09:39 AM
User activationid's are not being included in the email notices for my board. Is this query correct as there is no activationid field in the user table;

SELECT username,user.userid,email,joindate,activationid
FROM user
LEFT JOIN useractivation ON (user.userid=useractivation.userid)
WHERE user.usergroupid=3

This is the solution for this problem, I?ve got it from activate.php:

IN manageActivation.php
Under this:
while ($user=$DB_site->fetch_array($userArray))
{
Insert this code:

// 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 to ". $user[username]."<br>");
}
else
{
$user['activationid'] = vbrand(0, 100000000);
$DB_site->query("
UPDATE " . TABLE_PREFIX . "useractivation SET
dateline = " . TIMENOW . ",
activationid = $user[activationid]
WHERE userid = $user[userid] AND type = 0
");
echo ("ActivationID updated to ". $user[username]."<br>");
}

There is another problem with this hack, if someone change the email address the account is deleted inmediatly because the registration date is more than 10 days old...this is CRITICAL!

So the quick solution to this is to change the query like this:

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

So if the user have 1 or more posts the account is not deleted.

See ya.

sabret00the
07-21-2004, 10:05 AM
completely forgot about htis, i'll issue an update :) thank you psico :)

Oblivion Knight
07-21-2004, 10:42 AM
Nice work.. I'll be installing this shortly. :)

Natch
07-21-2004, 10:43 AM
Thanks for the update - installeD :)

-=Sniper=-
07-21-2004, 11:26 AM
will install :) thanks

kall
07-21-2004, 11:51 AM
Nice!

/me installs

psico
07-22-2004, 12:45 AM
completely forgot about htis, i'll issue an update :) thank you psico :)
you welcome ;)

rinkrat
07-22-2004, 05:17 PM
Shouldn't the manageActivation.php file go in includes/cron? Or does it matter?

sabret00the
07-22-2004, 05:25 PM
Shouldn't the manageActivation.php file go in includes/cron? Or does it matter?
that's exactly where it should be, did i say it should be somewhere different, could you tell me where so i could correct it please.

rinkrat
07-22-2004, 06:04 PM
It's not real clear for the noobs in the install.txt:

"1. upload manageActivation.php to your forum director."

sabret00the
07-22-2004, 07:25 PM
oops i'll have to fix that.

sv1cec
07-23-2004, 11:48 AM
oops i'll have to fix that.
Just installed it, but I am curious as to if the problems mentioned earlier by other members here, have been included in the installation files?

Hitting install. The hack just deleted my wife, who was a guinea pig account, not activated!!

Thanks

sabret00the
07-23-2004, 05:07 PM
yup problems mentioned above have been fixed

sv1cec
07-24-2004, 06:32 AM
yup problems mentioned above have been fixed
Thank you Sir!

sv1cec
07-26-2004, 07:53 AM
Maybe I have screwed up something or not followed the instructions properly (or this has been dealt with), but the e-mail send out does not include the $bbtitle, in the From text. Maybe, in the manageActivation.php, one should change :


mail ($user[email],$subject,$message,"From: \"$bbtitle Mailer\" <


with:


mail ($user[email],$subject,$message,"From: \"$vboptions[bbtitle] Mailer\" <


I am not sure, I'll create a new user now and wait to see what happens.

Rgds

sabret00the
07-26-2004, 07:54 AM
thanks, if you let me know i'll update the instructions :)

sv1cec
07-26-2004, 07:59 AM
thanks, if you let me know i'll update the instructions :)

Well, unless if you have an idea on how to "force" an e-mail out of the script, we'll have to wait for three days! LoL

Thanks for coming back and rgds

Datenpapst
07-26-2004, 01:24 PM
What about 0-Posters? Is there a hack, that does the same Emailing and so on and also delets user after 10 days?

sv1cec
07-30-2004, 04:58 AM
I checked, and yes, you should include the code change suggested in Post 43 (https://vborg.vbsupport.ru/showpost.php?p=537022&postcount=43).

It now shows the proper bbtitle.

Rgds

TTG
07-30-2004, 11:41 AM
Shouldn't the manageActivation.php file go in includes/cron? Or does it matter?


Downloaded today and instructions still read :-

"This hack will email members who have not yet activated their accounts and remind them to do so on day 3, 5, and 8. Users who have not activated after 10 days are deleted.

Installation is cake.
1. upload manageActivation.php to your forum director.
2. Create new templates based on the text files enclosed in the zip.
a. Template name = filename.
b. Template contents = file contents.
3. Set up your cron job to run the script once a day. Use vBulletin's default system "Scheduled Tasks"

Time to update !?

Useful hack ... clicked install :)

Malice
07-31-2004, 02:49 PM
I am tempted to use this...

I have 1700 UnActivated users on one and like 4000 on another...

sv1cec
08-01-2004, 03:00 PM
Is there any reason, why the e-mail gets send twice? Actually with a difference of one day between the two copies???

I am puzzled, I checked the code and can find any reason why. My cron entry is shown in the attachment and I have disabled to standard e-mail cron script.

Also, I do not get any log entries for the manageActivation. Is this normal or what?

Tnx

sabret00the
08-01-2004, 04:30 PM
have you got the default vb activate.php cron running?

sv1cec
08-02-2004, 04:29 AM
have you got the default vb activate.php cron running?

No, I have it disabled. And teh e-mails send are twins, I mean they mention the days (It has been 5 days since you registered, and you have not yet activated your account. ).

I am really getting mad with this because I can't find anything that can cause this hack to send the e-mails twice.

Rgds

sabret00the
08-03-2004, 06:10 PM
No, I have it disabled. And teh e-mails send are twins, I mean they mention the days (It has been 5 days since you registered, and you have not yet activated your account. ).

I am really getting mad with this because I can't find anything that can cause this hack to send the e-mails twice.

Rgds
can anyone confim this?

sabret00the
08-03-2004, 06:15 PM
if you're using 2.2 or below please upgrade now, it's quite critical, i'm having a few reports of members changing their addresses and everything going crazy. your board will be doomed and your community will die if you do not heed this warning

on another note, just upgrade to 2.3a thanks to sv1cec :)

lifesourcerec
08-04-2004, 01:32 AM
What are the cron settings for it?

Malice
08-04-2004, 10:31 PM
Does this tell them on Day 8 that their account will be removed in 2 days if they do not activate the account?

sabret00the
08-04-2004, 10:33 PM
yes it does sir
Dear $username,

Thank you for registering for the $vboptions[bbtitle]. It has been 8 days since you registered, and you have not yet activated your account. Your account will be deleted in 2 days if you have not activated by that time.

Please note - you must complete this last step to become a registered member. You will only need to click on the link once, and your account will be updated.

To complete your registration, click on the link below:
$vboptions[bburl]/register.php?a=act&u=$userid&i=$activateid

<a href="$vboptions[bburl]/register.php?a=act&u=$userid&i=$activateid">AOL Users click Here to be Activated</a>

**** Does The Above Link Not Work? ****
If the above link does not work, please use your Web browser to go to:
$vboptions[bburl]/register.php?a=ver

Please to be sure not to add extra spaces. You will need to type in your username and activation number on the page that appears when you click on our copy the above link in your browser.

Your Username is: $username
Your Activation ID is: $activateid



If you are still having problems signing up please contact a member of our support staff at $webmasteremail

Thanks very much,
$vboptions[hometitle] Team

sabret00the
08-04-2004, 10:35 PM
What are the cron settings for it? run it once a day

Malice
08-04-2004, 10:41 PM
GREAT! I will most likely run it once I get some other things smoothed over!

sv1cec
08-05-2004, 03:57 AM
can anyone confim this?

Sabret00the,

I created a test account to verify the warnings send out. Each e-mail was send twice, once on the proper date and one the following day. Here are the timestamps:

1st Action required e-mail: 07/26/2004 11:57
1st Warning e-mail (3 days) : 07/29/2004 11:11
copy of the above : 07/30/2004 11:15
2nd Warning e-mail (5 days) : 07/31/2004 11:55
copy of the above : 08/01/2004 11:16
3rd Warning e-mail (8 days) : 08/03/2004 11:11
copy of the above : 08/04/2004 11:14

Even though I am no php expert, I can't find any part of the hack that could cause this behaviour. At the time being I am creating another test user to try again the whole thing.

Rgds

y2krazy
08-30-2004, 03:17 AM
/me clicks install!

pagekeeper
09-05-2004, 09:46 PM
cheers ! very hard hack to find!!

this isnt included with the latest version of VB is it ?

sv1cec
09-06-2004, 05:16 AM
I have a question for the author here.

When the cron script is run manually, it generates some messages, like to which member the activation e-mail reminder has been send etc. However, when run from the cron, no such details are kept, anywhere, nor do I (the admin) receive any e-mail about who was warned or deleted.

I tried to find the code (in the script) which was supposed to send that e-mail to the admin, and I can't so maybe I am not that familiar with php, or maybe I missed something?

Rgds
-----------
John

venomx
09-06-2004, 05:40 AM
cheers ! very hard hack to find!!

this isnt included with the latest version of VB is it ?

I looked in my vb3.0.3 cron jobs and only see clean up 1 and 3... so not sure... Anyone?

sv1cec
09-06-2004, 12:27 PM
I looked in my vb3.0.3 cron jobs and only see clean up 1 and 3... so not sure... Anyone?
The one you should deactivate is called "Activation Reminder Email", if that is what you are asking.

Rgds
--------
John

venomx
09-06-2004, 01:12 PM
I dont see that under crons... Is there a place we turn that on at somewhere else?

pagekeeper
09-07-2004, 10:32 PM
problem i find is i know this hack is running every 12 hours but i cant understand why it does appear in the logs ? it would be useful thats all, is something set wrong maybe ?

Activation Reminder Email - deactivate or delete ? cause i dont think you can deactivate can you ?

:)

pagekeeper
09-11-2004, 10:22 PM
*bump*

im not sure wether this hack it working properly, for me anyways...

whats the numbers to set the cron scripts at ? every 24hrs ? im really confused so if someone could point out what to set it as would be cool.

any way to get it to show what its done in the logs ?

sabret00the
09-11-2004, 10:31 PM
run once every 24 hours should be something like "03 0 * * * "
and i'll release an add-on to get it to run it to add to the logs in the morning :)

SaN-DeeP
09-12-2004, 08:57 AM
sabret00the just 1 question for your hack.
My board is suffering from yahoo and hotmail spam filters, which make all the emails send from my forums to users spam/bulk mail folders who are using Yahoo or Hotmail. .

Does your hack, sends emails to there Inbox properly ?

Let me know. if it does, I will strarightway install it.

Regards,
Sandy...

sv1cec
09-12-2004, 02:38 PM
sabret00the just 1 question for your hack.
My board is suffering from yahoo and hotmail spam filters, which make all the emails send from my forums to users spam/bulk mail folders who are using Yahoo or Hotmail. .

Does your hack, sends emails to there Inbox properly ?

Let me know. if it does, I will strarightway install it.

Regards,
Sandy...
Sandy,

I have the same problem. I do not know why it happens (what Yahoo looks for and moves our e-mails to the "Bulk" folder, but what I did to help diminish the consequences, was to put a note about this issue, in the screen the user gets, after he/she registers. It's one of the phrases, called "registeremail".

At least, with that message, a Yahoo user knows where to look for the activation e-mail.

Rgds
------------
John

djroketboy
11-13-2004, 01:35 AM
ahh! I LOVE this hack, i've been wanting something like this!

i just noticed that the postings here stopped, did this get moved, removed, not supported any longer? i'm just curious...

i am running 3.03 and noticed this is for 3.01 and have a problem when running the vBcron script...

Warning: Cannot modify header information - headers already sent by (output started at /home/hpoa/public_html/community/includes/adminfunctions.php:223) in /home/hpoa/public_html/community/includes/functions.php on line 2716

I have only run this manually so far... and that's when i noticed it. it cleaned out about 200 un-activated members... :D yay!

ok, now have the "fixes" been applied that speak of users that are just changing their email address', it will not delete them correct? and finally.. i'm not getting any logging or emails.... this seemed to be where the posts in this thread stopped... can anyone clue me in ?

thanks!

Aaron

sv1cec
11-13-2004, 04:34 AM
Aaaron,

Check your code again, there should be a mistake somewhere.

I am running the cron job and it works OK.

Rgds
-------------
John

djroketboy
11-13-2004, 05:00 AM
Aaaron,

Check your code again, there should be a mistake somewhere.

I am running the cron job and it works OK.

Rgds
-------------
John
hmm, i just noticed something... while playing with this hack... when it sends a email it doesn't go into the junkmail folder for yahoo....

anyone know what this sends differently? I would like to apply that change to my main vb activation and other emails... it's really annoying that they go into the junkmail folders for users....

also, are thes lines supposed to be commented out?

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

sabret00the
11-16-2004, 11:21 AM
updated this

Boofo
11-16-2004, 12:00 PM
updated this
What did you change in it, sir? ;)

And please don't forget to update it at my site. ;)

sabret00the
11-16-2004, 12:35 PM
added a chdir to make sure it worked even if your forum aint in your root directory and added a line of code to log the crons :)

outlaw621
11-18-2004, 06:01 PM
problem i find is i know this hack is running every 12 hours but i cant understand why it does appear in the logs ? it would be useful thats all, is something set wrong maybe ?

Activation Reminder Email - deactivate or delete ? cause i dont think you can deactivate can you ?

:)

Why make extra work for yourself. Instead of deleteing it, edit the existing Activation Reminder Email cron job to point to the manageActivation.php file instead of activate.php. When you select the cron time you want it to run at, choose a time that your board is at its slowest activity.

djroketboy
11-18-2004, 11:45 PM
updated this

hey, i got the update, but am still having problems :(

Warning: chdir(): No such file or directory (errno 2) in /home/hpoa/public_html/community/includes/cron/manageActivation.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/hpoa/public_html/community/includes/adminfunctions.php:223) in /home/hpoa/public_html/community/includes/functions.php on line 2714

sabret00the
11-19-2004, 09:13 AM
your line 21 should read

chdir('/home/hpoa/public_html/community/'); //change to your vbulletin path

can you let me know if it say that please :)

djroketboy
11-19-2004, 09:04 PM
your line 21 should read

chdir('/home/hpoa/public_html/community/'); //change to your vbulletin path

can you let me know if it say that please :)

ok, i missed that, it wasn't in the directions :cheeky:

I still get this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/hpoa/public_html/community/includes/adminfunctions.php:223) in /home/hpoa/public_html/community/includes/functions.php on line 2714

djroketboy
11-19-2004, 09:17 PM
ok, i missed that, it wasn't in the directions :cheeky:

I still get this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/hpoa/public_html/community/includes/adminfunctions.php:223) in /home/hpoa/public_html/community/includes/functions.php on line 2714
ok well, since i've had more time today, i figured it out... i removed this line:
require_once('./global.php');

and now i get no errors, and it works ;)

thanks guys!!
djroketboy clicks install!

EDIT: ohh, i do still have one more question though, how can i by pass the default original sent email by vbulletin, and use your method, your method does NOT go into the junkmail folders for hotmail and yahoo (atleast for my test emails)...

it would save me sooo much headache if the original activation email was sent like yours...

Kwikms
11-24-2004, 11:54 PM
Nice :)

It's been asked here before, but I couldnt find an answer. How about an "Un-Active User Management"? Same thing, but for users who didnt do a log-in for about xy days. They get an email "You did not visit the forum for xy days. If you do not click this link your account will be deleted in 14 days" or so.

Or is there a hack like this available?

sabret00the
11-29-2004, 01:10 PM
Nice :)

It's been asked here before, but I couldnt find an answer. How about an "Un-Active User Management"? Same thing, but for users who didnt do a log-in for about xy days. They get an email "You did not visit the forum for xy days. If you do not click this link your account will be deleted in 14 days" or so.

Or is there a hack like this available?
it shouldn't be too hard, it's just a matter of editing the queries. however surely your users wouldn't be too happy if they went on holiday and came back to find their account deleted?

sabret00the
11-29-2004, 01:10 PM
ok well, since i've had more time today, i figured it out... i removed this line:
require_once('./global.php');

and now i get no errors, and it works ;)

thanks guys!!
djroketboy clicks install!

EDIT: ohh, i do still have one more question though, how can i by pass the default original sent email by vbulletin, and use your method, your method does NOT go into the junkmail folders for hotmail and yahoo (atleast for my test emails)...

it would save me sooo much headache if the original activation email was sent like yours...
i have no idea how this differs from the default sorry :(

Kwikms
11-29-2004, 01:30 PM
it shouldn't be too hard, it's just a matter of editing the queries. however surely your users wouldn't be too happy if they went on holiday and came back to find their account deleted?

Thats why they should first get an email "if you do not login within the next xx days (lets say 21) your account will be deleted. And this email will be send to people which did not log in for lets say 365 days.

So I think it is not just to edit some querys, isnt it? And in that case I dont mind if people who didnt visit my board for a year and are on a over three week vacation will be deleted :rolleyes:

jluerken
12-11-2004, 01:53 PM
// 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
");



This part is not working when using table prefixes. Could this be updated please?

I also only want to have an email as admin which users can be deleted. I don't want the script to do so.

sabret00the
12-11-2004, 02:17 PM
// Get all users who have not activated their accounts.
$userArray=$DB_site->query("
SELECT username,user.userid,email,joindate,activationid
FROM " . TABLE_PREFIX . "user
LEFT JOIN useractivation ON (user.userid=useractivation.userid)
WHERE user.usergroupid=3 AND user.posts = 0
");

is the fix you need

the second part of the script is a bit much for me right now although not a big task, just my heads in something else, but i'll remember and hopefully get it out by the end of the month :)

jluerken
12-11-2004, 02:30 PM
No this is not working.

I also tried

// Get all users who have not activated their accounts.
$userArray=$DB_site->query("
SELECT username,user.userid,email,joindate,activationid
FROM " . TABLE_PREFIX . "user
LEFT JOIN " . TABLE_PREFIX . "useractivation ON (user.userid=useractivation.userid)
WHERE user.usergroupid=3 AND user.posts = 0
");


but then I get:

Invalid SQL:
SELECT username,user.userid,email,joindate,activationid
FROM vb3_user
LEFT JOIN vb3_useractivation ON (user.userid=useractivation.userid)
WHERE user.usergroupid=3 AND user.posts = 0

mysql error: Unknown table 'user' in field list

sabret00the
12-11-2004, 02:37 PM
ok try this, it's stupid and shouldn't work but let me know
// Get all users who have not activated their accounts.
$userArray=$DB_site->query("
SELECT username," . TABLE_PREFIX . "user.userid,email,joindate,activationid
FROM " . TABLE_PREFIX . "user
LEFT JOIN " . TABLE_PREFIX . "useractivation ON (" . TABLE_PREFIX . "user.userid=" . TABLE_PREFIX . "useractivation.userid)
WHERE " . TABLE_PREFIX . "user.usergroupid=3 AND " . TABLE_PREFIX . "user.posts = 0
");

jluerken
12-11-2004, 02:43 PM
This seems to work. Thanks man. Please update your hack according to this!

sabret00the
12-11-2004, 03:43 PM
i will update it soon, i just need to get round to adding the other features first :)

i.e. better logging in the task logs rather than just stating it's been done and email to specified user to log the events there also.

nubian
12-12-2004, 12:09 AM
i didn't see anything concrete but does this work for 3.0.3?
thanks

sabret00the
12-12-2004, 12:50 AM
yes it's working with vb3.0.3 :)

nubian
12-14-2004, 03:13 AM
---edit i'm retarded :o

sv1cec
12-16-2004, 08:14 AM
I've been using this hack for some time, and it works OK (3.0.3), but I have one question.

From the code, I assume that the cron script checks if a user is in group 3 (waiting activation) and has zero posts, and then it proceeds to check if his activation code is empty (I do not know in which case this happens) when it generates an activation code for those users. If it is not empty, it changes the activation code for the users.

Why do you do that? I mean a user has registered and is send an e-mail with an activation code. He receives it today, and he does not activate for two days. Then he tries to activate, but the script has changed his activation id, to something else, when it was run some time during the evening of the first day. Is this what happens? I would expect a change of activation code, to occur only for those users who have reached the limit of 3, 5 or 8 days, just before the new e-mail is send.

The reason I am asking, is that I have received several problems from users who try to activate and they can't. Then when I send them a new activation code, they activate fine, if they do it immediately (I do not know what happens if they do not do it immediately, haven't discuss it with anyone).

I would appreciate your comments.

Rgds

sabret00the
12-16-2004, 09:49 AM
the reason that it was done that way was because, when it tried to extract the initial activation code from the database it would always come up empty, so the fix was making a new one, it was one of the earlier bug fixes by boofo.

nubian
12-18-2004, 12:48 PM
i've created a test user who has not been activated via email.
seems like the script works when sending out mail but the mail text body is empty..no subject no text in the body.
somebody please help.
thanks in advance

sabret00the
12-18-2004, 01:02 PM
i've created a test user who has not been activated via email.
seems like the script works when sending out mail but the mail text body is empty..no subject no text in the body.
somebody please help.
thanks in advance
did you install the templates included in the zip?

nubian
12-18-2004, 01:06 PM
did you install the templates included in the zip?
i was going to delete what i said.
i did something retarded and added the templates to my default style template and not another template that i'm currently using.
shame on me.
hopefull it'll work
thanks for the speedy reply though

sv1cec
12-18-2004, 02:23 PM
the reason that it was done that way was because, when it tried to extract the initial activation code from the database it would always come up empty, so the fix was making a new one, it was one of the earlier bug fixes by boofo.
I am not sure why this was happening, but I just created a test user and I got his activation code fine, from the useractivation table, the same as the one send to him in the e-mail.

But even if for some reason you find the activation code empty, what is the reason for creating a new id for users who have already one?

As far as I am concerned, I am removing the else part from that if.

Rgds

sabret00the
12-18-2004, 02:33 PM
fair doo's however i don't get why you're saying it with such attitude? after all this is a free script you're using is it not?

sv1cec
12-18-2004, 02:58 PM
fair doo's however i don't get why you're saying it with such attitude? after all this is a free script you're using is it not?
Pardon me, I was not having any attitude, I was just trying to get your experience and expertise on that.

I asked why you are changing the activation code, and you replied to me that you create a new one, because sometimes you find empty ids. I understand that, but I am still puzzled why you are changing the existing codes, when that action prevents users from activating their accounts.

Don't you think that other members who have installed this hack should know that, when users start e-mailing them with questions why they can't activate?

If you don't have an explanation, fine, no problem, I'll do what I think is appropriate, but don't accuse me of an attitude, when all I am doing is trying to understand what you are doing, in this hack. I think I have that right, or am I wrong?

sabret00the
12-18-2004, 03:31 PM
Pardon me, I was not having any attitude, I was just trying to get your experience and expertise on that.

I asked why you are changing the activation code, and you replied to me that you create a new one, because sometimes you find empty ids. I understand that, but I am still puzzled why you are changing the existing codes, when that action prevents users from activating their accounts.

Don't you think that other members who have installed this hack should know that, when users start e-mailing them with questions why they can't activate?

If you don't have an explanation, fine, no problem, I'll do what I think is appropriate, but don't accuse me of an attitude, when all I am doing is trying to understand what you are doing, in this hack. I think I have that right, or am I wrong?
ok to explain this, the original hack was ported from vb2 and set to run instead of activate.php in the crons directory, at that point when first released boofo ran it on his server and reported the bug that no id was being sent, i confirmed this via my server, under both tests there no. infact sorry afrer re-reading the thread it was bryan that reported it and it was fixed by Pscio https://vborg.vbsupport.ru/showpost.php?p=535495&postcount=29 at that point everyone was happy and it was a great triumph for an open source project such as this one, don't get me wrong i understand why you'd not like the id reset but As far as I am concerned, I am removing the else part from that if. the tone in your original post was offensive to me being someone that's ported this from vb2 and supported it to the best of my ability since then.

it's a saturday afternoon i have a hangover and and don't even have time to do such leisurly things as updating the hack yet i find time to do support i'm just stating that i didn't like your tone (attitude) i do beleive i have the right to do that or am i wrong?

sabret00the
12-18-2004, 04:22 PM
version 2.4 has been released

sv1cec
12-18-2004, 05:06 PM
ok to explain this, the original hack was ported from vb2 and set to run instead of activate.php in the crons directory, at that point when first released boofo ran it on his server and reported the bug that no id was being sent, i confirmed this via my server, under both tests there no. infact sorry afrer re-reading the thread it was bryan that reported it and it was fixed by Pscio https://vborg.vbsupport.ru/showpost.php?p=535495&postcount=29 at that point everyone was happy and it was a great triumph for an open source project such as this one, don't get me wrong i understand why you'd not like the id reset but the tone in your original post was offensive to me being someone that's ported this from vb2 and supported it to the best of my ability since then.

it's a saturday afternoon i have a hangover and and don't even have time to do such leisurly things as updating the hack yet i find time to do support i'm just stating that i didn't like your tone (attitude) i do beleive i have the right to do that or am i wrong?
It seems that your hangover made you grumpy.

The quote you mention was not meant in any attitude.

I believe that the role of us here, is to help users of our hacks. So, I asked a question and I didn't get an answer, so the least I can do is to inform other users that there is a problem here. And I did it in a very polite way, by just saying what I am going to do. I didn't suggest others to do the same, I didn't emphasize the problem.

Instead of thanking me for locating a serious problem in your code, you accused me of having an attitude. Of course and you have the right to not like my tone (I assume you mean "my writings", because you can't hear my tone), but since you agreed to provide support from this hack, you'd better answer your user's questions, before criticizing their attitude.

Boofo
12-18-2004, 05:51 PM
It seems that your hangover made you grumpy.
That was a cheap shot.

but since you agreed to provide support from this hack, you'd better answer your user's questions, before criticizing their attitude.
Just because an author "agrees" to provide support for a hack, doesn't mean he/she has to drop everything and run to it the second there is a problem. Authors DO have private lives, too. They are sharing something with everyone, not getting paid or reimbursed in any way for it. telling someone they'd "better answer their your user's questions, before criticizing their attitude" isn't going to make the author want to run to help anyone. You get more flies with honey. Something to think about. ;)

sv1cec
12-18-2004, 06:17 PM
Just because an author "agrees" to provide support for a hack, doesn't mean he/she has to drop everything and run to it the second there is a problem. Authors DO have private lives, too. They are sharing something with everyone, not getting paid or reimbursed in any way for it. telling someone they'd "better answer their your user's questions, before criticizing their attitude" isn't going to make the author want to run to help anyone. You get more flies with honey. Something to think about. ;)

I didn't expect you to leave your life and answer my question. I posted the initial question on 16. Dec 2004, 13:14, and I came back to check the answer one day and several hours later.

So stop making accusations for non-existing things. Nobody asked you to leave whatever you were doing and come to answer.

But when you decide to answer, you'd better answer the asked question. And you didn't, for whatever reasons, I do not care. And I tried, as politely as I could, to draw your attention to the fact that this was a serious problem. If you want, I can forward to you the e-mails I've received from people who couldn't activate, because of your code. And I didn't complain, I didn't accuse you of anything, I just tried to get your attention, and the attention of other people who are using your hack, by simply stating what I am going to do. And you got angry about it, and accused me of having an attitude.

And if honey gets you more flies, so what? What was I supposed to do? Be apologetic? For what? For your luck of answer? From what I saw, you issued a new version of your hack, to correct the problem I noticed. If I were not as persistent, I am sure the hack will continue like that for who knows how long (because coders have lives as you say, and don't have time to support their users), causing admins headaches from users who wouldn't be able to activate, one day after they received the activation e-mail.

In any case, I deny to continue this confrontation. Case closed for me.

sabret00the
12-18-2004, 08:17 PM
none of it matters, lets just enjoy the hack and community :)

sv1cec
12-19-2004, 04:28 AM
none of it matters, lets just enjoy the hack and community :)
My point exactly. Have a great Sunday.

Goodday to you.

qhoa
12-20-2004, 11:00 PM
i tried installed the ver 2.4 and i got this error
Manage Activation
Fatal error: Cannot redeclare convert_short_varnames() (previously declared in C:\VBB\forums\includes\init.php:118) in C:\vbb\forums\includes\init.php on line 118

What wrong i did
thanks

sabret00the
12-21-2004, 08:18 AM
did you edit the file qhoa?

qhoa
12-21-2004, 10:38 AM
yes sab....
I already did follow the intruction
chdir("K:/Network/xampp/htdocs/forums/"); //change to my vbulletin path
that's all i did
upload this file into include/cron then going to schedule tasks set it up
when i run it i got that error

sabret00the
12-21-2004, 11:43 AM
chdir("K:/Network/xampp/htdocs/forums/"); //change to my vbulletin path

that line should read something like
chdir("/home/SITENAME/public_html/forums/"); //change to my vbulletin path

by teh time you finished with it.

qhoa
12-21-2004, 12:05 PM
yeah i did
i change my VB path

sabret00the
12-21-2004, 12:13 PM
then sadly i have no idea why it's not working, especially as i'm not asking it declare short names in the first place :(

qhoa
12-21-2004, 12:14 PM
before i install this hack i already read all the post in this thread
in this case i feel something wrong in the db query code inside of .php file
but i unable to find out by my self and i think i can't done this without all you guy
please help
oh because my site it's non english thatwhy i'm not giving you a link but i thought it's not needed to you
anotherwords, in line 118 of the init.php is
118 function convert_short_varnames(&$array, $add_to_REQUEST = false)
i hope it enought info for you

qhoa
12-21-2004, 12:27 PM
i tried to install it with my localhost (my lab) i have the same error too

qhoa
12-21-2004, 12:31 PM
oh i found it thank you thank you
in the manageActivation.php
i add the code
if (!is_object($DB_site))
{
exit;
}
below the
error_reporting(E_ALL & ~E_NOTICE);

then line require_once("./global.php");
i replace with //require_once("./global.php");
anh it work on me
but i still thank you to you Sa... to try help me
you have a greate day Sa....

qhoa
12-21-2004, 12:41 PM
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

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
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
// 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(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>");
}

// 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>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";
}

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

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.

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

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


and replace with//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
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
What's the downside to having a large amount of unactive members saved?
Odd...


3 Day Reminder Sent To: zigza.


The username is actually zigzag.

No other problems tho. :)

sabret00the
02-19-2005, 05:57 PM
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.


What's the downside to having a large amount of unactive members saved?
just using up db space for no reason.


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

Is it full 3.0.7 compatible?
it is indeed.

Eagle Creek
03-01-2005, 11:39 AM
you're meant to be using the 0.2 one.


it is indeed.
Nice, thx.

Slave
03-03-2005, 01:39 AM
Got this working .. nice hack :)

Am I right in thinking that I should delete the "Activation Reminder Email" cron job?

sabret00the
03-06-2005, 07:56 PM
Got this working .. nice hack :)

Am I right in thinking that I should delete the "Activation Reminder Email" cron job?
yeah, you should. not the file but the cron.

Slave
03-07-2005, 08:03 AM
yeah, you should. not the file but the cron.
Ta .. :)

Leeper
03-29-2005, 01:04 AM
OK, I've got to disable this thing temporarily until I can get some help. I installed this about two weeks ago and started receiving email that my site was spaming new registraints with up to 700 emails requiring them to click on the link (that was already expired) to activate their account.
I really want to get this thing running but I'm hesitant after pumeling a few of the new users with a ton of email.

Anyone got any ideas on what I might have missed that would cause this to happen?

sabret00the
03-29-2005, 08:15 AM
OK, I've got to disable this thing temporarily until I can get some help. I installed this about two weeks ago and started receiving email that my site was spaming new registraints with up to 700 emails requiring them to click on the link (that was already expired) to activate their account.
I really want to get this thing running but I'm hesitant after pumeling a few of the new users with a ton of email.

Anyone got any ideas on what I might have missed that would cause this to happen?
my suggestion would be to install it, then register yourself and see just how many you receive.

Leeper
03-29-2005, 12:14 PM
Yeah I did that on the first report of this problem and had no problem. Then I had several others report the same problem and the issue seemed to be expanding exponentially. I had installed 5 hacks in the past 2 weeks so I started looking at these individually and when I got to this one I went through the instructions again and it finally dawned on me (I’m a little slow on the up take). I didn’t want to delete the old “activation” cron job until I saw this one working correctly so I just zeroed out all the timed fields in the task and that should do it right… Wrong! The activation was kicking off every minute and resetting the codes as it went on at its feverish pace. I changed the setting to run once a month (on the old cron) and will delete the task in two weeks if no more problems are reported.

Thanks!

Kaishi
04-20-2005, 04:46 AM
for some reason, a user's name got reported twice in my email, like this
3 Day Reminder Sent To: Xantrix, Xantrix

also got this when i tried to run the cron manually to test it

Sent 5 Day email to Test1
Sent 5 Day email to McHavoc
Sent 3 Day email to Xantrix
Sent 3 Day email to Xantrix
Sent 3 Day email to Ensui

it's sent out twice to xantrix here too :( , does anyone know what's wrong?

T3MEDIA
04-20-2005, 11:18 AM
would LOVE a add on that would check to see if the deleted user has a photopost folder and delete that as well.think this could be an addon?

sabret00the
04-20-2005, 11:25 AM
for some reason, a user's name got reported twice in my email, like this
3 Day Reminder Sent To: Xantrix, Xantrix

also got this when i tried to run the cron manually to test it

Sent 5 Day email to Test1
Sent 5 Day email to McHavoc
Sent 3 Day email to Xantrix
Sent 3 Day email to Xantrix
Sent 3 Day email to Ensui

it's sent out twice to xantrix here too :( , does anyone know what's wrong?
is it just that user that's getting special treatment?

sabret00the
04-20-2005, 11:26 AM
think this could be an addon?
could be but not by me.

Kaishi
04-20-2005, 03:47 PM
is it just that user that's getting special treatment?

for now, it seems xantrix is the only one that has his name appear twice.

Cyricx
04-20-2005, 04:26 PM
Do you have phpmyadmin?

If so, first to go the admincp -> users -> search for users -> xantrix and then at the top you'll see User: Xantrix (id:XX)

Write that number down, then go into your phpmyadmin and check out the useractivation table

browse it and see if there is multipe entries for that userid.

Not sure how it could have happened, but that's the table this hack gets it's info from as it's the one I clear out when I reload my test site. :)

Kaishi
04-20-2005, 07:23 PM
i checked the useractivation table, only 1 entry of xantrix's ID, but there's a duplicate of someone else's id. the person with the same ID appearing 2 times in the table, i had activated myself in admin cp, so i dunno >.<

by the way, is it safe for me to clear out the userids that i have activated manually in the useractivation table?

Kaishi
04-22-2005, 04:02 AM
new update. the problem seems to extend past xantrix.

manageActivation Complete;
3 Day Reminder Sent To: Ludin, Shadey, Niell, Niell, Otik, Otik, Beachboy, Beachboy, sunnydolor, sunnydolor.

5 Day Reminder Sent To: Xantrix, Xantrix.

8 Day Reminder Sent To: None.

Users Deleted: No one was deleted.

please help, i love this script, would love to have it work correctly.

Marco van Herwaarden
04-22-2005, 05:32 AM
Had a look into this problem and i think i know why some users show up double.

If you send a new activation mail from AdminCP (user contacted you to say they never received the mail??), vB will add a second record for that user into the 'useractivation' table, making this script see 2 waiting activations.

Can you confirm this scenario?

Kaishi
04-22-2005, 05:58 AM
Had a look into this problem and i think i know why some users show up double.

If you send a new activation mail from AdminCP (user contacted you to say they never received the mail??), vB will add a second record for that user into the 'useractivation' table, making this script see 2 waiting activations.

Can you confirm this scenario?
i don't know if the user themselves clicked on resend validation or whatever link it was. but i looked inside the useractivation table and there it was indeed multiple entries of those people's ID's, each with a different activation ID. hope that helps with troubleshooting.

also, is it safe to delete the contents in the useractivation table after this 'bug' have been fixed? or will it be fine to just leave it there as it is?

Marco van Herwaarden
04-22-2005, 06:09 AM
The double entries in the useractivation table are not caused by this hack, it is standard vB behaviour. It is only that this hack don't check for double ones, so there should be no reason to manually remove entries from that table.

Kaishi
04-22-2005, 06:12 AM
is there a way to intergrate checking for double IDs? i found it strange that close to every user that it sends out reminders to, are getting double.

sabret00the
04-22-2005, 09:35 AM
you could try changing SELECT user.username, user.userid, user.email, user.joindate, useractivation.activationid


to
SELECT DISTINCT(user.username), user.userid, user.email, user.joindate, useractivation.activationid

Marco van Herwaarden
04-22-2005, 09:53 AM
Better to edit the manageActivation.php.

Find:
$userArray=$DB_site->query("
SELECT username," . TABLE_PREFIX . "user.userid,email,joindate,activationid
FROM " . TABLE_PREFIX . "user
LEFT JOIN " . TABLE_PREFIX . "useractivation ON (" . TABLE_PREFIX . "user.userid=" . TABLE_PREFIX . "useractivation.userid)
WHERE " . TABLE_PREFIX . "user.usergroupid=3 AND " . TABLE_PREFIX . "user.posts = 0
");

And replace by:
$userArray=$DB_site->query("
SELECT username,user.userid,email,joindate,activationid
FROM " . TABLE_PREFIX . "useractivation AS useractivation
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid=useractivation.userid)
WHERE dateline =
(select MAX(dateline) FROM " . TABLE_PREFIX . "useractivation AS ua2 WHERE ua2.userid = useractivation.userid)
AND user.usergroupid=3 AND user.posts = 0 ");


Your code wouldn't work sabe, try it.

PS I not tried my solution, so test it on a testboard first.

Not tested, but i think that would do the trick.

Kaishi
04-22-2005, 03:38 PM
marcho your code got me this error, did i copy something wrong?

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT username,user.userid,email,joindate,activationid
FROM useractivation AS useractivation
LEFT JOIN user AS user ON(user.userid=useractivation.userid)
WHERE dateline =
(select MAX(dateline) FROM useractivation AS ua2 WHERE ua2.userid = useractivation.userid)
AND user.usergroupid=3 AND user.posts = 0
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select MAX(dateline) FROM useractivation AS ua2 WHERE ua2.useri

mysql error number: 1064

Marco van Herwaarden
04-22-2005, 04:03 PM
What MySQL version are you using?

Kaishi
04-22-2005, 04:06 PM
What MySQL version are you using?
4.0.22-standard

Marco van Herwaarden
04-22-2005, 06:41 PM
Hmm not sure, will look if there are any clauses used that where not allowed in 4.0 a litle bit later.

Marco van Herwaarden
04-22-2005, 07:51 PM
Just checked this subquery is not allowed in MySQL 4.0. :(

Will have to rewrite it using LEFT JOINs. Will be a tough one. Will try if i can have a look this weekend.

Kaishi
04-23-2005, 03:07 AM
Just checked this subquery is not allowed in MySQL 4.0. :(

Will have to rewrite it using LEFT JOINs. Will be a tough one. Will try if i can have a look this weekend.
i really appreciate it! thanks alot in advance. i love this vb.org community, i couldn't get help with stuff anywhere else for some reason.

Kaishi
04-28-2005, 04:39 PM
i hope you guys didn't forget about me :(

Marco van Herwaarden
04-28-2005, 07:28 PM
i hope you guys didn't forget about me :(Actually i did. :(

Is a bit hectic these days and i can't spend as much time as i would like on vB. Will try to find some time to have a look at your problem in the next days i hope.

Kaishi
04-28-2005, 07:33 PM
:D ok

Kaishi
05-05-2005, 04:24 AM
another problem kinda. sometimes it would send a 3/5/8 day reminder to someone, then the next day it would send the same reminder again. for example, today user x got a 3 day reminder, tomorrow, he gets a 3 day reminder again.

sabret00the
05-05-2005, 07:02 PM
another problem kinda. sometimes it would send a 3/5/8 day reminder to someone, then the next day it would send the same reminder again. for example, today user x got a 3 day reminder, tomorrow, he gets a 3 day reminder again.i've never got this myself but am testing it with today and tomorrow's mailout.

Kaishi
05-07-2005, 04:09 AM
on the http://www.ebslive.com/confessions/?do=confess page, somehow

the vboptions[hometitle] confession box is about relief...

the vbtoptions[hometitle] didn't parse, or that u forgot a $. that's on your site btw lol

edit: i'm such a dumb ass sometimes, i posted on the wrong thread! lol

kall
05-19-2005, 11:16 PM
I might just be really stupid but... do we delete the existing Manage Activation cron task?

I have a test account that keeps getting the standard one..minus the 'we will delete you in 2 days' and stuff.

Sadie Frost
06-14-2005, 01:25 AM
Does anyone know if this will still work with 3.5? (since it did not require file edits) :)

ADM
06-28-2005, 03:45 AM
hmm I also have that problem where it sends a notice to the same users who received one the day before.

For example:

June 27th:
manageActivation Complete;
3 Day Reminder Sent To: tit24, Dragontalin, Jonny, William Of Occam, Musopticon?, jolepros.

5 Day Reminder Sent To: Taiwnoser, Razier, Clnqt, trigun0006, crusaderqb207, kmcqb207, Kill Switch.

8 Day Reminder Sent To: Ghast.

Users Deleted: No one was deleted.

June 28th:
manageActivation Complete;
3 Day Reminder Sent To: QwNtacular, tit24, Dragontalin, Jonny.

5 Day Reminder Sent To: Clnqt, trigun0006, crusaderqb207, kmcqb207, Kill Switch, William Of Occam, Musopticon?, jolepros.

8 Day Reminder Sent To: Ghast.

Users Deleted: MaxPayne.

sabret00the
06-28-2005, 08:06 AM
I might just be really stupid but... do we delete the existing Manage Activation cron task?

I have a test account that keeps getting the standard one..minus the 'we will delete you in 2 days' and stuff.just don't run it, so yes delete the cron but not the file.


Does anyone know if this will still work with 3.5? (since it did not require file edits) not at present but when it goes gold i will update the hack.


hmm I also have that problem where it sends a notice to the same users who received one the day before.
i'm still to receive this problem, however i'm sure marco said at some stage that it may be due to that user activating twice, or something similar.

ADM
06-28-2005, 04:08 PM
I've just had a user receive an 8 day notice 3 days in a row.

Is there any way I can fix this? This is happening quite frequently on my setup.

okc
07-27-2005, 07:31 AM
I like the hack, but I've got a problem - I set up a dummy account to see if it was working properly and while it said it emailed me for being 3 days delinquent (which was right), I never got the email (problem). I checked & I can email from vB OK, the hack just doesn't get the email there - any ideas?

thx

sabret00the
07-27-2005, 08:09 AM
I like the hack, but I've got a problem - I set up a dummy account to see if it was working properly and while it said it emailed me for being 3 days delinquent (which was right), I never got the email (problem). I checked & I can email from vB OK, the hack just doesn't get the email there - any ideas?

thx

you can receieve emails on the same installation via the admincp but not the cron?

okc
07-27-2005, 03:30 PM
Problem 1 - I get the status/notification email, which says it sent a reminder to my test account email, but I never get that email at my test account. Somehow the email reminder does not go out.

Should the chdir line look something like this?
chdir('/home/public_html/forums/')

Problem 2 - I'm getting about 100 emails giving me status/notification (3 day users notified, etc) - a few every few minutes - I'd like to fix this.

MissKalunji
10-13-2005, 12:37 PM
any plan for 3.5?

sabret00the
10-13-2005, 01:31 PM
as soon as i get time.

MissKalunji
10-13-2005, 02:14 PM
as soon as i get time.

youhou! praise :nervous:

jarekn
04-20-2006, 11:08 PM
I'd like to use this hack as I have forum with over 20K members and about 9K are not activated thanks to fu@%*$ hotmail filters and what not...

However I do not want to delete the members in case they didn't activate in time or what not, that being said I'd setup the cron job to run once per week over and over and hope that they'll all be able to get the activation email at one time or another...

Would apreciate any help :)

jarekn
02-02-2007, 03:52 PM
pah.. never mind... modified the script not to delete....

will try it this weekend... have over 10000 members who have not activated their account....