From c89f78aa4d825da0bce42ca4e8986d1a7fa58159 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 9 Jul 2003 21:54:35 +0000 Subject: - Bugfix: fixed the "check for duplicate e-mail addresses" test. Patch by Marco. --- modules/user.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/user.module') diff --git a/modules/user.module b/modules/user.module index 8c78ee76a..662e12e39 100644 --- a/modules/user.module +++ b/modules/user.module @@ -825,7 +825,7 @@ function user_register($edit = array()) { else if (db_num_rows(db_query("SELECT name FROM users WHERE LOWER(name) = LOWER('%s')", $edit["name"])) > 0) { $error = t("The name '%s' is already taken.", array("%s" => $edit["name"])); } - else if (db_num_rows(db_query("SELECT mail FROM users WHERE LOWER(mail) = LOWER('%s')", $edit["mail"])) > 0) { + else if (db_num_rows(db_query("SELECT mail FROM users WHERE LOWER(mail) = LOWER('%s') OR LOWER(init) = LOWER('%s')", $edit["mail"], $edit["mail"])) > 0) { $error = t("The e-mail address '%s' is already taken.", array("%s" => $edit["mail"])); } else if (variable_get("user_register", 1) == 0) { -- cgit v1.2.3