From 689369d4602cbc40395f212bd9439444dedca2a9 Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 19 Nov 2007 06:45:25 +0000 Subject: [PATCH] - Don't collide emails with the existing user being saved --- user_personal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_personal.php b/user_personal.php index 132fe46..9bef905 100644 --- a/user_personal.php +++ b/user_personal.php @@ -91,7 +91,7 @@ /* Check for an email collision */ $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) { $notice = 'email_exists'; } else {