[Fusionforge-commits] r7001 - branches/Branch_4_7/gforge/common/include

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Feb 19 18:33:21 CET 2009


Author: lolando
Date: 2009-02-19 18:33:21 +0100 (Thu, 19 Feb 2009)
New Revision: 7001

Modified:
   branches/Branch_4_7/gforge/common/include/User.class.php
Log:
Also enforce sys_require_unique_email for email changes

Modified: branches/Branch_4_7/gforge/common/include/User.class.php
===================================================================
--- branches/Branch_4_7/gforge/common/include/User.class.php	2009-02-19 17:30:23 UTC (rev 7000)
+++ branches/Branch_4_7/gforge/common/include/User.class.php	2009-02-19 17:33:21 UTC (rev 7001)
@@ -278,7 +278,7 @@
 			return false;
 		}
 		if ($GLOBALS['sys_require_unique_email']) {
-			if (db_numrows(db_query("SELECT user_id FROM users WHERE email='$email'")) > 0) {
+			if (db_numrows(db_query("SELECT user_id FROM users WHERE email='$email' OR email_new='$email'")) > 0) {
 				$this->setError(_('User with this email already exists - use people search to recover your login.'));
 				return false;
 			}
@@ -805,6 +805,12 @@
 			return false;
 		}
 
+		if ($GLOBALS['sys_require_unique_email']) {
+			if (db_numrows(db_query("SELECT user_id FROM users WHERE email='$email' OR email_new='$email'")) > 0) {
+				$this->setError(_('User with this email already exists.'));
+			return false;
+			}
+		}
 		$res=db_query("
 			UPDATE users
 			SET confirm_hash='$hash',




More information about the Fusionforge-commits mailing list