- Don't collide emails with the existing user being saved

This commit is contained in:
dave 2007-11-19 06:45:25 +00:00
parent 5a4daf5580
commit 689369d460

View File

@ -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 {