summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Phillips2006-06-05 16:41:09 (GMT)
committer Chad Phillips2006-06-05 16:41:09 (GMT)
commitaf910eba9f994d148ef3cb4b277e80ba553c99be (patch)
tree2a21306a5102aafda4fde9a83b022cdf75235e10
parent33664cfe1c4c598ae77263556c24efc155e82a92 (diff)
#66675 -- Email address as the username. patch by me. now allows users to have an email address as their username, even w/ the login with email setting enabled.
-rwxr-xr-xlogintoboggan.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/logintoboggan.module b/logintoboggan.module
index 8c567ac..f551680 100755
--- a/logintoboggan.module
+++ b/logintoboggan.module
@@ -313,8 +313,8 @@ function logintoboggan_user_login_validate($form_id, $form_values) {
function logintoboggan_user_register_validate($form_id, $form_values) {
if (variable_get('login_with_mail', 0)) {
// check that it's not an e-mail
- if (valid_email_address($form_values['name'])) {
- form_set_error('name', t('You may not use an e-mail address as your username.'));
+ if (db_num_rows(db_query("SELECT uid FROM {users} WHERE LOWER(mail) = LOWER('%s')", $form_values['name'])) > 0) {
+ form_set_error('name', t('This e-mail address has already been taken by another user.'));
}
}