Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: tigerfaerie on July 26, 2005, 04:28:09 AM

Title: Multiple accounts per email address
Post by: tigerfaerie on July 26, 2005, 04:28:09 AM
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?
Title: Re: Multiple accounts per email address
Post by: ÞħÞ on July 26, 2005, 05:02:29 PM
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 :)
Title: Re: Multiple accounts per email address
Post by: tigerfaerie on July 27, 2005, 02:02:25 AM
Thank you much!   :-*
Title: Re: Multiple accounts per email address
Post by: 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?
Title: Re: Multiple accounts per email address
Post by: ÞħÞ on August 16, 2005, 07:06:41 PM
All you do is comment out the check for duplicate e-mails...
Title: Re: Multiple accounts per email address
Post by: T.S. on August 19, 2005, 03:19:54 AM
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.  ;)
Title: Re: Multiple accounts per email address
Post by: andcorp on September 10, 2005, 05:13:27 AM
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 ??
Title: Re: Multiple accounts per email address
Post by: tigerfaerie on September 12, 2005, 12:06:25 PM
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
Title: Re: Multiple accounts per email address
Post by: Ikaryas on February 06, 2007, 07:43:19 AM
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?
Title: Re: Multiple accounts per email address
Post by: Ikaryas on February 08, 2007, 04:03:48 PM
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
Title: Re: Multiple accounts per email address
Post by: drhamad on February 08, 2007, 04:23:04 PM
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)
Title: Re: Multiple accounts per email address
Post by: Ikaryas on February 09, 2007, 05:25:12 AM
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
Title: Re: Multiple accounts per email address
Post by: Ikaryas on February 10, 2007, 02:17:05 PM
please... anyone? is this really impossible?