PDA

View Full Version : Un-Activated User Management


amykhar
03-09-2003, 10:00 PM
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.

Xyphen
03-10-2003, 01:39 AM
Wow, very nice, going to install!!

refertech
03-10-2003, 01:51 AM
very sweet hack. Could this work for users that are activated but are inactive for a period of time that i set?

Mark

amykhar
03-10-2003, 01:55 AM
I have another hack in my profile that handles inactive members, refertech. It's in beta hacks but it will probably be moved to full releases in a few days. It seems solid.

Amy

refertech
03-10-2003, 02:02 AM
Great. Your the man i mean lady.

Thanks,


:)

amykhar
03-10-2003, 02:11 AM
Normally I don't bug people about clicking install, but I have a feeling this hack will wind up acquiring new features in the future. If you want to receive the update email, clicking install would make that happen.

JulianD
03-10-2003, 02:34 AM
nice hack, I have a problem with those unconfirmed users, and i'm definitively installing this hack! thanks!

Smoothie
03-10-2003, 03:30 AM
Is this configured in the admin cp? Got any screen shots?

007
03-10-2003, 09:38 AM
Say someone registers and their userid is 100. If they turn out to be innactive and don't activate, then would there be a way to have the other usernames that registered and activated after them, say 101, 102 and 103, all drop down and fill the gap? So they would now be 100, 101, and 102? That would be cool. :)

sabret00the
03-10-2003, 09:45 AM
that's a great hack i got 30 un activated accounts on my board, it's annoying

refertech
03-10-2003, 10:14 AM
* refertech clicks install. :)

sparky2
03-10-2003, 10:17 AM
Originally posted by 006
Say someone registers and their userid is 100. If they turn out to be innactive and don't activate, then would there be a way to have the other usernames that registered and activated after them, say 101, 102 and 103, all drop down and fill the gap? So they would now be 100, 101, and 102? That would be cool. :)

No.
The user.userid field is the primary key for the user table.
Mysql autoincrements & assigns the field value as each row is created.
Anyhow, if you could change it, and did... all the posts, PMs, subscribethread records etc. would then be associated with the "wrong" userids.

007
03-10-2003, 10:59 AM
Oh yeah I tried something like this once and that's what happened. It's probably possible with a huge query, but probably not worth the effort. You're right ;)

amykhar
03-10-2003, 01:07 PM
Originally posted by Smoothie
Is this configured in the admin cp? Got any screen shots?

No to both. The emails are configurable by templates but if you want to change the times the emails are sent, you have to tinker with the code.

No screenshots because there are no screens. It's a silent script that runs via cron.

Amy

amykhar
03-10-2003, 01:09 PM
Originally posted by 006
Say someone registers and their userid is 100. If they turn out to be innactive and don't activate, then would there be a way to have the other usernames that registered and activated after them, say 101, 102 and 103, all drop down and fill the gap? So they would now be 100, 101, and 102? That would be cool. :)

Don't think you want to do that and here is why. In 10 days after the person fails to activate you could get 100 new members who do actively post. Their posts, etc are all marked with their userid. In addition, people may have bookmarked their profile page, etc. based on their current userid.

(Just noticed Sparky handled that one. Thank you Sparky)

Amy

drives fast
03-10-2003, 02:28 PM
19 out of 20 times the reason they haven't completed their registration is due to them not receiving the e-mail in the first place and sending them more could be a waste of time.

The reasons I have noticed range from their inbox being full, their privider considering them spam, their provider not accepting from your host to them giving a bogus address.

My site often has problems contacting hotmail, AOL and various other un-heard of providers. Lately my site cannot contact msn.com e-mail users at all.

I can see a lot of e-mails comming from people complaining that they keep registering and it doesn't work.

I see no way to win this situation but if it were only due to the new registrants laziness or stupidity in completing the process rather than for all the other reasons this is a nice hack anyway.

amykhar
03-10-2003, 03:05 PM
I ban hotmail because of that problem. I agree that the emails are probably not being received, but heck it's automated and doesn't waste my time. :D

Amy

Bane
03-10-2003, 04:10 PM
Will this affect already unactivated users?

Dean C
03-10-2003, 04:10 PM
Very good idea amy :)

* Mist likes

- miSt

amykhar
03-10-2003, 05:10 PM
Originally posted by Bane
Will this affect already unactivated users?

Not sure what you mean. This one is a check for people who never clicked the email activation link.

Amy

bspiller82
03-10-2003, 05:11 PM
BuMp Installed

amykhar
03-10-2003, 05:11 PM
Originally posted by Mist
Very good idea amy :)

* Mist likes

- miSt

Actually the email part is not my idea. It was in the requests forum. It was so similar to my delete inactive users hack that it only took a few minutes to put together so I just went ahead and did it.

Amy

Gryphon
03-10-2003, 10:19 PM
Originally posted by Bane
Will this affect already unactivated users?

Yes, it will delete the ones you already have that are over 10 days, and email the others.

jjj0923
03-11-2003, 01:17 PM
Great Hack. there people are a hassle to manage. Most people just enter their email address incorrectly or attempt to gain access to the forum without ever intending to complete the registration. This will keep out the interlopers. I will probably make a change and only give them 7 days total before deletion.

thanks!

- jeff

amykhar
03-12-2003, 02:27 PM
Glad you like it, Jeff :)

Amy

amykhar
03-14-2003, 03:45 PM
Just a suggestion:

Installing this hack: https://vborg.vbsupport.ru/showthread.php?s=&threadid=18140&highlight=activation

as well, will probably ensure that people who don't receive the email will know to contact you for assistance.

Amy

Capt PPRuNe
03-18-2003, 12:11 AM
Installed hack but emails being sent out are without content or subject.

Can you confirm that the manageActivation.php file should be in the forums/admin directory or the foums directory? Have tried both but when in forums dir nothing happens and when in the forums/admin dir just get the blank email.

Accounts over 10 days without activation are deleted OK.

amykhar
03-18-2003, 01:02 AM
It goes in the forums directory. If blank emails are being sent out, the templates are probably not installed in the style set that either you or your cron script are using.

Amy

Capt PPRuNe
03-18-2003, 10:22 AM
OK, have made sure that the templates are in all styles. Now the email being sent out does not show Username or Activation ID.

What they get is:

To complete your registration, click on the link below:
http://www.pprune.org/forums/register.php?a=act&u=&i=

The email is sent to the address of unactivated users but without any relevant data.

Any ideas?

amykhar
03-18-2003, 01:31 PM
It doesn't sound like you have the correct stuff in the templates. There are 3 different email message templates. The line you are quoting appears in the middle of my 3 templates, and not at the beginning.

Amy

Capt PPRuNe
03-19-2003, 09:36 AM
I know it is in the middle. I am just quoting the relevant bit. The script isn't pulling anything except the users email address. The activation code is not being filled with the relevant user ID number or the activation code number. Here is what is being sent out to unactivated users using your script (unmodified):Dear ,

Thank you for registering for the PPRuNe Forums forums. It has been 3 days since you registered, and you have not yet activated your account.

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:
http://www.pprune.org/forums/register.php?a=act&u=&i=

<a href="http://www.pprune.org/forums/register.php?a=act&u=&i=">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:
http://www.pprune.org/forums/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:
Your Activation ID is:



If you are still having problems signing up please contact a member of our support staff at admin1@pprune.org

Thanks very much,
PPRuNe Forums team

Also, couldn't you have written the script so that the activation script sits in the admin directory? It is a bit of a security hole because anyone who knows a bit about vBulletin can register themselves, post whatever they want once their registration has been active over 10 days (or after 3/5/8 days), change their email address but not activate it and then call the activation script and delete themselves automatically.

At the moment, if someone who has been a member for over 10 days and has simply changed their email address but not activated it yet and the script is run then their account is deleted automatically. Is there any way to add functionality by checking join date and if that is over say 10 days old that the account isn't deleted. I know I'm asking a lot but how about those accounts with join dates over 10 days old but not activated because of a change in email address that have at least 1 post have their User Title changed to something in bold red that they are going to be deleted if not activated within another 10 days? Just thinking aloud.

I think the script is a great idea and reduces workload but I need to make sure that it works. I have over 60,000 registered users and get over 50 new ones a day so deletion of unactivated users is a chore.

Kathy
03-19-2003, 10:57 AM
I installed (thanks Amy!) and have empty personal content on the email also.

I created the three templates for content, and one for the subject matter. However on the first night the cron sent email, there is no content that will help my members register....

The manageActivation.php isn't pulling personal info into the template although the $username and $userid snips are in there...just as Capt PPRune.

Any ideas?

amykhar
03-19-2003, 02:00 PM
I'll check it again regarding the missing info.

Regarding the admin directory, it doesn't work as a cron script in the admin directory. What I recommend is changing the name of the script to something only you know. However, I am also going to put a password option in it.

Amy

amykhar
03-19-2003, 02:42 PM
OK. I put a password on the file. Change it in the php file to be whatever you choose. It's not the most secure thing in the world but is better than nothing.

The info is also showing up now. The zip had the wrong php file in it. To upgrade, simply edit the file to reflect your desired password and upload it. You will have to run the file like this:

http://www.yourforums.com/forums/manageActivation?password=password


Amy

USODJA
03-19-2003, 02:56 PM
I am getting a 404 error now......

and yes I put my url in...

amykhar
03-19-2003, 03:07 PM
I don't get a 404 error when I go to your page:

http://www.usodja.com/forums/manageActivation.php

I just get a no permission error.

Amy

USODJA
03-19-2003, 03:43 PM
no, i put in the password part like above and it goes 404
I have not changed passwords yet (until it works)

And yes I get what you get above, so even as admin, it will not let me do it...

amykhar
03-19-2003, 04:32 PM
Check your PM USODJA.

Amy

USODJA
03-19-2003, 05:41 PM
Cool, and dealt with, now for a cron problem ( I am removing some of the url to hide real direct) I get these two error lines back from the cron output.

/home/forums/manageActivation.php: line 3: syntax error near unexpected token `require('./global.php')'
/home/forums/manageActivation.php: line 3: ` require('./global.php');'

amykhar
03-19-2003, 08:08 PM
I am not really a cron expert. I typically run cron jobs using Lynx. Do you have any php cron jobs that work on your site without Lynx?

Capt PPRuNe
03-19-2003, 10:41 PM
Thanks Amy. That's fixed it. I also like the more informative 'report' when running it manually.

USODJA
03-20-2003, 10:27 AM
Nope, I tried the cpanel set up, it keeps erroring out, so I will go manual for now, by the way Amy when I ran manual today, that member you saw yesterday, came up again today!

That don't seem right....LOL

amykhar
03-20-2003, 01:14 PM
USODJA, if you run it manually, you need to make sure it's at least 24 hours between runs. If you run it at 8pm one day and noon the next day, you are likely to see the same member.

;)

Amy

USODJA
03-20-2003, 02:38 PM
opps.....LOL

Spam them again....LOL

Oh well Will run tomorrow morning again, should be better by then!

Thanks :)

squawell
04-19-2003, 05:22 PM
i have a problem when i run manageActivation.php i got i no

permission message...so what's wrong?

amykhar
04-19-2003, 05:44 PM
I don't know. Without a link to your forums or any idea where you put the file, I can't psychically debug your board.

Amy

ImportPassion
05-15-2003, 01:18 AM
Will this delete users that have changed their pwd or email but are already a registered user? Cause they get put back in that cat after they make a change like that. That could be bad. Especially if they have like 3000 posts or something.

D

squawell
05-22-2003, 08:57 PM
04-20-03 at 02:44 AM amykhar said this in Post #46 (https://vborg.vbsupport.ru/showthread.php?postid=384278#post384278)
I don't know. Without a link to your forums or any idea where you put the file, I can't psychically debug your board.

Amy
finally i got that work

i open the manageActivation.php find

$pass = "password";

replace to

$pass = "";

and it works....... :banana:

sabret00the
06-02-2003, 08:15 AM
i keep getting this email

[1]EBS Live [2]Registration is free! [3]Calendar [4]Find other members
[5]Search
[6]Click here to go to the sites main page [7]Click here to go to the
forum index page [8]Click here to go to the EBS Chat Room [9]Click
here to go to take an EBS Live Quiz [10]Click here to go to the EBS
Live Arcade [11]Click here to go to the EBS Live Journals [12]Click
here to go to the EBS Live Forum Item Store
[spacer.gif] [spacer.gif] [spacer.gif]


vBulletin vBulletin Message
You are not logged in or you do not have permission to access this
page. This could be due to one of several reasons:
1. You are not logged in. Fill in the form at the bottom of this page
and try again.
2. You do not have permission to access the page that you were trying
to. Are you trying to edit someone else's post or trying to access
administrative features? Check that you are allowed to perform
this action in the Forum Rules.
3. If you are trying to post, the administrator may have disabled
your account, or it may be awaiting activation.

Your User Name: _________________________ [13]Want to register?
Your Password: _________________________ [14]Forgotten your
password?
Login!

The administrator may have required you to [15]register before you can
view this page.

Forum Jump:
[Please select one:.............] [go.gif]-Submit

[16]Forum Guidelines - [17]Apply To Become A Moderator
< [18]EBS Live - [19]Chat Room - [20]Journals - [21]Quizzes -
[22]Arcade - [23]Store - [24]Forum Stats - [25]Contact Us >
[26]The Archive

Powered by: vBulletin Version 2.2.9
Copyright ?2000-2003 Jelsoft Enterprises Limited.
Styleset developed by [27]sabret00the Copyright ?2002-2003
Graphics and Buttons by [28]sabret00the Copyright ?2002-2003
Additional button set icons by [29]Nick Miller Copyright
[30]Rapidz?2002-2003
Page generated in 0.07705402 seconds (84.13% PHP - 15.87% MySQL) with
11 queries.
i think i might be doing something wrong?

amykhar
06-02-2003, 03:40 PM
Looks like you are emailing the wrong template

sabret00the
06-02-2003, 07:14 PM
that's not the email, that's what i get from the cron job

it's doing a lynx -dump www.ebslive.com/forums/manageAcitivation.php everyday at 5pm (GMT) and that's what it gets, but i was thinking if it was working, surely it would be logged it wouldn't it 0_o

was i meant to set it up it's own account or edit the php file or something?

sabret00the
06-03-2003, 05:20 PM
amy?

amykhar
06-03-2003, 05:26 PM
sabre, I have a hunch you put the script in your admin directory. It doesn't belong there because we can't pass in the login and password there.

pgowder
06-03-2003, 07:14 PM
So how can I verify it works before I cron it?

I try running it in the browser and I get permission denied.

How can I check to see that the emails where sent.

Thanks

pgowder
06-03-2003, 07:24 PM
05-22-03 at 05:57 PM squawell said this in Post #48 (https://vborg.vbsupport.ru/showthread.php?postid=398638#post398638)
finally i got that work

i open the manageActivation.php find

$pass = "password";

replace to

$pass = "";

and it works....... :banana:

Nevermind, I found it!

sajjid
06-03-2003, 11:22 PM
this is a great hack i like as matter of fact i am just about to click the install button.
but i think it would be a great addon if you could lookup users who have not posted anything since registeration and delete them i am sure there is a way.
Thanks either way its a great hack even without it

DILLIGAF
06-08-2003, 10:23 PM
Here is an idea if anyone wants to take it on to improve this hack abit. have it self powered by the message board it self. have it run throught he functions.php this way every time the board is accessed, the moded hack will do a time check to see if it when the admin wants it to run and also it it is a new day. If it is, it runs the hack.

Talisman
06-09-2003, 12:58 AM
Hi Amy,

(This is a great hack..... thanks.)

Would you help me make a change to the final step in this hack? Instead of deleting them all, we would rather dump them together into a separate usergroup ..... what would amount to a "dead" file for people with NO access -- and who wouldn't show up on our member list.

We banned someone 1-1/2 years ago who still keeps trying to sneak back in. He's tried dozens of fake names/accounts and gets other people (who are more knowledgeable) to help set up garbage identities for him or find ways to get past vB security. So at our site, we want to keep the information we get in the system from incomplete registrations.

Let me know if you need any other information to do this. And thanks, again, for the hack.

Cheers,

Talis.

sabret00the
07-31-2003, 02:53 PM
06-03-03 at 07:26 PM amykhar said this in Post #53 (https://vborg.vbsupport.ru/showthread.php?postid=403965#post403965)
sabre, I have a hunch you put the script in your admin directory. It doesn't belong there because we can't pass in the login and password there. got it to work by taking out password thing

GoTTi
09-01-2003, 06:19 PM
i get a blank page when i run this on 2.3.0, any1 else duplicating?

crowfield99
09-04-2003, 12:01 PM
Hi,

Sorry to be a pain could someone tell me what I need to input in the Command to run in cPanl / Cron so it does this for me?

Many thanks :)

Capt PPRuNe
09-16-2003, 01:33 PM
Will this delete users that have changed their pwd or email but are already a registered user? Cause they get put back in that cat after they make a change like that. That could be bad. Especially if they have like 3000 posts or something.

D

Yes it will. While it is an extremely useful hack it does cause me much extra work when long serving users change their email address. If someone has been registered more than 10 days and they change their email address and don't respond to the verification email before the next cron run then their profile is deleted automatically. What this generates is numerous complaints from long serving users who suddenly can't log in or when they eventually try to reply to the verification email they can't get anywhere with it.

Is there any way to change the hack so that it only applies to new registrations or else looks up the join date and handles the verification differently?

teksigns
09-24-2003, 04:04 PM
Yes it will. While it is an extremely useful hack it does cause me much extra work when long serving users change their email address. If someone has been registered more than 10 days and they change their email address and don't respond to the verification email before the next cron run then their profile is deleted automatically. What this generates is numerous complaints from long serving users who suddenly can't log in or when they eventually try to reply to the verification email they can't get anywhere with it.

Is there any way to change the hack so that it only applies to new registrations or else looks up the join date and handles the verification differently?
i with you on this Capt PPRuNe
.....


this would be nice and make the script much more usable .

teksigns
09-24-2003, 04:22 PM
i can see the select statement :


$userArray=$DB_site->query("SELECT username,user.userid,email,adminemail,joindate,act ivationid FROM user LEFT JOIN useractivation ON (user.userid=useractivation.userid) WHERE user.usergroupid=3");




what part of it would need to be changed to make the select
only include users that registered 10 days or less ago ....


this would help make it complete

Falkware
09-27-2003, 02:59 PM
i get a blank page when i run this on 2.3.0, any1 else duplicating?
Indeed, also getting a blank page in v2.3.0.

I tried clearing out the password field but it didn't solve the problem.

Z00MER
09-29-2003, 08:48 AM
wow thanx

Logician
09-30-2003, 10:33 AM
Indeed, also getting a blank page in v2.3.0.

I tried clearing out the password field but it didn't solve the problem.
Blank pages after hack installations usually indicates template problems. Make sure:
1- You installed the hack templates correctly.
2- Template names are exact (it is CASE SENSITIVE!) and no trailing space at the end.
3- If you have more than 1 template sets, hack templates should be installed to ALL template sets.

Hope this helps..

Logician
09-30-2003, 10:38 AM
btw. while creating templates do not include ".txt" in the template name.

eg. Template name is "ActivationEmailSubject", not "ActivationEmailSubject.txt"