lgwong
Apr 6 2002, 12:37 AM
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
Apr 6 2002, 09:43 AM
Thanks a lot :smile:
This should be very useful!
Rupe Parnell
Apr 6 2002, 09:45 AM
Thank you :biggrin: !
I wonder how many other flaws there are in the CAC script that have gone unnoticed...
Brenda@PJ
Apr 6 2002, 01:55 PM
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
Apr 6 2002, 06:17 PM
Thanks so much.. :smile:
Oliver
Yrlec
Apr 6 2002, 11:09 PM
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
Apr 7 2002, 12:28 AM
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
Apr 7 2002, 12:41 AM
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
Apr 7 2002, 01:25 AM
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.