forked from science-ation/science-ation
- Don't collide emails with the existing user being saved
This commit is contained in:
parent
5a4daf5580
commit
689369d460
@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
/* Check for an email collision */
|
/* Check for an email collision */
|
||||||
$em = mysql_escape_string(stripslashes($_POST['email']));
|
$em = mysql_escape_string(stripslashes($_POST['email']));
|
||||||
$q=mysql_query("SELECT id FROM users WHERE email='$em'");
|
$q=mysql_query("SELECT id FROM users WHERE email='$em' AND id!='{$u['id']}'");
|
||||||
if(mysql_num_rows($q) > 0) {
|
if(mysql_num_rows($q) > 0) {
|
||||||
$notice = 'email_exists';
|
$notice = 'email_exists';
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user