summaryrefslogtreecommitdiff
path: root/modules/user
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-05-22 08:04:40 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-05-22 08:04:40 +0000
commitef14b0df899a07fc002398040fffdfae8a09ad66 (patch)
tree04acf7d9edb6825df71306ed09685a694a35392d /modules/user
parent45731a4e60bfeda4036398783351f49e4cdd07f1 (diff)
downloadbrdo-ef14b0df899a07fc002398040fffdfae8a09ad66.tar.gz
brdo-ef14b0df899a07fc002398040fffdfae8a09ad66.tar.bz2
#61856 by blakehall, Pancho, and jredding: Trim e-mail addresses before validation/submission.
Diffstat (limited to 'modules/user')
-rw-r--r--modules/user/user.module2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 6845be0a7..b780d299b 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -521,6 +521,7 @@ function user_save($account, $edit = array(), $category = 'account') {
$edit['access'] = REQUEST_TIME;
}
+ $edit['mail'] = trim($edit['mail']);
$success = drupal_write_record('users', $edit);
if (!$success) {
// On a failed INSERT some other existing user's uid may be returned.
@@ -613,6 +614,7 @@ function user_validate_name($name) {
}
function user_validate_mail($mail) {
+ $mail = trim($mail);
if (!$mail) {
return t('You must enter an e-mail address.');
}