Help - Search - Members - Calendar
Full Version: Prevent duplicate sign up with same email
Get Paid Forum - Get Paid Discussion > Webmaster's Corner > Advertising Section related to Running a website > Script Exchange > For Sale Archive
lgwong
The original CAC script actually permit signing up for multiple accounts with the same email as long as the capitalisation is different, so lgwong@mail.com, Lgwong@mail.com and LGWONG@MAIL.COM are all considered different by the script. I have made a modification to prevent this problem. I hope that it helps.

QUOTE
open signup.cgi

find the following

if (-e "$userdatadir$u") {

$message = "<i>You have already signed up. Please follow the
instructions in the e-mail that you received.</i>";

replace with

$duplicate = 0;
opendir (FILE, "$userdatadir");
@users = readdir(FILE);
closedir (FILE);
foreach $user (@users) {
$user = "L$user";
$utmp = "L$u";
if ($user eq $utmp) {
$duplicate = 1;
}
}

if ($duplicate){

$message = "<i>You have already signed up. Please follow the
instructions in the e-mail that you received.</i>";


[ 04-06-2002: Message edited by: lgwong ]

Chris Houlihan
Thanks a lot :smile:
This should be very useful!
Rupe Parnell
Thank you :biggrin: !

I wonder how many other flaws there are in the CAC script that have gone unnoticed...
Brenda@PJ
Hey, that's great! Now, if someone could only fix the part that kills a persons downline if a member quits or is deleted...
MrEmails
Thanks so much.. :smile:

Oliver
Yrlec
Isn't it very ineffective to search through the whole user-databse directory each time someones signs up? I'm pretty sure there are easier ways to check for duplicate accounts....
lgwong
Any suggestions? The problem is that the created account already contains both small and big caps. Unless you change the whole database, we cannot use a simple if ( -e to solve the problem.
Yrlec
Ok, I see...
Why don't you create a script which renames all user-files to lowercase. You will benefit from this in the long run....
lgwong
I am thinking about this, but there are a few places that need a change.

1. I need to convert everything into small caps when using try to login or signup.

2. change [b]u, upline, downline[/b} field to small cap inside the users' data file.

3. change all the big caps inside the pedata directory to small caps as well.

4. and ...... still thinking whether there is any.

So nearly need to rewritten the database. Just solve the temp problem first and make a more detail plan.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.