diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-07-09 21:54:35 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-07-09 21:54:35 +0000 |
commit | c89f78aa4d825da0bce42ca4e8986d1a7fa58159 (patch) | |
tree | c5abe8f3cf1cf489e3eff454f6f42a9db333b979 /modules | |
parent | ae4fe72d17ba4ab24172509f1219bea2f049835c (diff) | |
download | brdo-c89f78aa4d825da0bce42ca4e8986d1a7fa58159.tar.gz brdo-c89f78aa4d825da0bce42ca4e8986d1a7fa58159.tar.bz2 |
- Bugfix: fixed the "check for duplicate e-mail addresses" test. Patch by
Marco.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user.module | 2 | ||||
-rw-r--r-- | modules/user/user.module | 2 |
2 files changed, 2 insertions, 2 deletions
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) { diff --git a/modules/user/user.module b/modules/user/user.module index 8c78ee76a..662e12e39 100644 --- a/modules/user/user.module +++ b/modules/user/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) { |