News:

Wondering if this will always be free?  See why free is better.

Main Menu

Multiple accounts per email address

Started by tigerfaerie, July 26, 2005, 04:28:09 AM

Previous topic - Next topic

tigerfaerie

It's probably something really simple.  But does anyone know how to make it so that someone can register more than one account with the same email address?

ÞħÞ

In Sources/Register.php, replace

// Check if the email address is in use.
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE emailAddress = '$_POST[email]'
OR emailAddress = '$_POST[user]'
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) != 0)
fatal_error(sprintf($txt[730], htmlspecialchars($_POST['email'])), false);
mysql_free_result($request);

with

/*
// Check if the email address is in use.
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE emailAddress = '$_POST[email]'
OR emailAddress = '$_POST[user]'
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) != 0)
fatal_error(sprintf($txt[730], htmlspecialchars($_POST['email'])), false);
mysql_free_result($request);
*/


That should do it :)

| My Website [nofollow]
There are 10 types of people in the world:
Those who understand binary and those who don't

tigerfaerie


tigerfaerie

LMAO.

I changed the code as posted here.  And people kept telling me they still couldn't double register.

Now upon looking at the code, both of them look EXACTLY the same.

So what am I supposed to change?

ÞħÞ

All you do is comment out the check for duplicate e-mails...

| My Website [nofollow]
There are 10 types of people in the world:
Those who understand binary and those who don't

T.S.

Quote from: tigerfaerie on August 14, 2005, 03:38:45 PM
LMAO.

I changed the code as posted here.  And people kept telling me they still couldn't double register.

Now upon looking at the code, both of them look EXACTLY the same.

So what am I supposed to change?
They aren't exactly the same, you are missing the very top and bottom line from the changed code.  ;)

andcorp

I would love to try this, because this is exactly what i want to do, but i have read elsewhere in the forums that this will cause problems with alot of functions, is this the case ??

tigerfaerie

I haven't had any problems since I commented out the request for the email check.  You have to do it in a couple different places too.   Register, ManageMembers, and Subs-Members

Ikaryas

I think I've changed it but I'm not sure... it couldn't find that text... instead I added /* and */ at this text:
// Ummm... don't even dare try to take someone else's email!!
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE emailAddress = '$_POST[new_email]'
LIMIT 1", __FILE__, __LINE__);
// !!! Separate the sprintf?
if (mysql_num_rows($request) != 0)
fatal_error(sprintf($txt[730], htmlspecialchars($_POST['new_email'])), false);
mysql_free_result($request);

updateMemberData($row['ID_MEMBER'], array('emailAddress' => "'$_POST[new_email]'"));
$row['emailAddress'] = stripslashes($_POST['new_email']);

$email_change = true;
}

But it doesn't work... is it the wrong text?

Ikaryas

can someone help?
by the previous code, I got a blank page when I wanted to register (after I added /* and */)
I really need this fixed 'cause I have a RPG forum where people can have multiple characters and thus multiple accounts...

please someone... ? I have SMF version 1.1.1

drhamad

Try putting the /* */ around this only:


// Ummm... don't even dare try to take someone else's email!!
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE emailAddress = '$_POST[new_email]'
LIMIT 1", __FILE__, __LINE__);
// !!! Separate the sprintf?
if (mysql_num_rows($request) != 0)
fatal_error(sprintf($txt[730], htmlspecialchars($_POST['new_email'])), false);
mysql_free_result($request);


In other words, don't comment out those last 3 lines that you commented out.

(Note, I don't have the ability to test that right now, so I'm just going off basic guesses)
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

Ikaryas

That email address ([email protected]) is being used by a registered member already. If you feel this is a mistake, go to the login page and use the password reminder with that address.

still doesn't work... but at least, I'm not getting a white page :P

Ikaryas

please... anyone? is this really impossible?  

Advertisement: