Commit ef14b0df authored by webchick's avatar webchick

#61856 by blakehall, Pancho, and jredding: Trim e-mail addresses before validation/submission.

parent 45731a4e
......@@ -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.');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment