Hello
I'm looking for a plugin to prohibit the registration of several accounts with the same email.
In my forum, for some user, they have 2-3 accounts with the same address email.
Thanks
Sorry for my poor english, i'm french.
++
Xavatar
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();
}
}
////////////////////////////////////////////////////////////////////////////////////////////
---------------