MyBB Community Forums

Full Version: multiple accounts with 1 email address
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hi all

i have a question, i recently noticed i have more than one account registered with the same e-mail address on my board, all activated, different user names, how can i prevent people from registering with the same e-mail more than once?

thanks in advance
There's a plugin that does that, I think...
I made a plugin to do that...however, I'm not sure if it is compatible with the latest version of MyBB. Please let me know if it works out or not:
http://dennistt.net/forum/showthread.php?tid=47
thanks for your replies
i tried it on xampp lite, it didn't work, i tried a test account on xampp, and it actually sent me an e-mail!, and registered my test account on the actual site, i am sorry if that's another question, but why is that?

and now i can't log out, i did all those template changes, using latest version of mybb, any help would be appreciated.
i did the template changes again, now the login/out works

any solution for the original problem would be appreciated, thanks
member.php


Find
-----------
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post")
{
-----------


Replace
-----------
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post")
{

////////////////////////////////////////////////////////////////////////////////////////////
require_once MYBB_ROOT."inc/config.php";
$post_email = $_POST[email];
$post_email2 = $_POST[email2];

if ($post_email != $post_email2) {

ECHO "Enter a valid email address.";
exit();
}
else {

$conn=mysql_connect($config[hostname], $config[username], $config[password]);
// mysql_query("SET NAMES 'utf8'");
mysql_select_db($config[database]) or die ("Unable to connect to MySQL");
// print "Connected to MySQL";
$list_query = "SELECT * FROM forum_users WHERE email=\"$post_email\" ORDER BY uid DESC";
$result = mysql_query($list_query) or die("ERROR!");
$count = mysql_num_rows($result); //get the match number

if ( $count != 0) {
ECHO "That email address is already registered.";
exit();
}
}
////////////////////////////////////////////////////////////////////////////////////////////

-----------
hotmail5002 Wrote:member.php


Find
-----------
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post")
{
-----------


Replace
-----------
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post")
{

////////////////////////////////////////////////////////////////////////////////////////////
require_once MYBB_ROOT."inc/config.php";
$post_email = $_POST[email];
$post_email2 = $_POST[email2];

if ($post_email != $post_email2) {

ECHO "Enter a valid email address.";
exit();
}
else {

$conn=mysql_connect($config[hostname], $config[username], $config[password]);
// mysql_query("SET NAMES 'utf8'");
mysql_select_db($config[database]) or die ("Unable to connect to MySQL");
// print "Connected to MySQL";
$list_query = "SELECT * FROM forum_users WHERE email=\"$post_email\" ORDER BY uid DESC";
$result = mysql_query($list_query) or die("ERROR!");
$count = mysql_num_rows($result); //get the match number

if ( $count != 0) {
ECHO "That email address is already registered.";
exit();
}
}
////////////////////////////////////////////////////////////////////////////////////////////

-----------

thanks a million Wink , gonna try it sometime soon Smile
hotmail5002 Wrote:member.php


Find
-----------
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post")
{
-----------


Replace
-----------
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post")
{

////////////////////////////////////////////////////////////////////////////////////////////
require_once MYBB_ROOT."inc/config.php";
$post_email = $_POST[email];
$post_email2 = $_POST[email2];

if ($post_email != $post_email2) {

ECHO "Enter a valid email address.";
exit();
}
else {

$conn=mysql_connect($config[hostname], $config[username], $config[password]);
// mysql_query("SET NAMES 'utf8'");
mysql_select_db($config[database]) or die ("Unable to connect to MySQL");
// print "Connected to MySQL";
$list_query = "SELECT * FROM forum_users WHERE email=\"$post_email\" ORDER BY uid DESC";
$result = mysql_query($list_query) or die("ERROR!");
$count = mysql_num_rows($result); //get the match number

if ( $count != 0) {
ECHO "That email address is already registered.";
exit();
}
}
////////////////////////////////////////////////////////////////////////////////////////////

-----------

Does this code work on mybb 1.2.13 or is there any new plugin out to resolve this problem?
devcynic Wrote:
hotmail5002 Wrote:member.php


Find
-----------
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post")
{
-----------


Replace
-----------
if($mybb->input['action'] == "do_register" && $mybb->request_method == "post")
{

////////////////////////////////////////////////////////////////////////////////////////////
require_once MYBB_ROOT."inc/config.php";
$post_email = $_POST[email];
$post_email2 = $_POST[email2];

if ($post_email != $post_email2) {

ECHO "Enter a valid email address.";
exit();
}
else {

$conn=mysql_connect($config[hostname], $config[username], $config[password]);
// mysql_query("SET NAMES 'utf8'");
mysql_select_db($config[database]) or die ("Unable to connect to MySQL");
// print "Connected to MySQL";
$list_query = "SELECT * FROM forum_users WHERE email=\"$post_email\" ORDER BY uid DESC";
$result = mysql_query($list_query) or die("ERROR!");
$count = mysql_num_rows($result); //get the match number

if ( $count != 0) {
ECHO "That email address is already registered.";
exit();
}
}
////////////////////////////////////////////////////////////////////////////////////////////

-----------

Does this code work on mybb 1.2.13 or is there any new plugin out to resolve this problem?

No need to do that code change; upload this file in your plugins folder; go to your manager and activate. Made it for 1.2.10; but just tested it and works also on 1.2.13.
It's for MyBB any version
Pages: 1 2