diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-02 12:57:37 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-02 12:57:37 +0000 |
commit | 33e8024752eeb1d2b82704248932d7222d22e148 (patch) | |
tree | d1231193b033645c3db1c6be58abe45d839df3e2 | |
parent | 5362c16386453d2e81c1dde864ae29c093c223fd (diff) | |
download | brdo-33e8024752eeb1d2b82704248932d7222d22e148.tar.gz brdo-33e8024752eeb1d2b82704248932d7222d22e148.tar.bz2 |
#135329 follow up: rolling back some of the user password request form changes, so user names in email address format (eg. site_network module) will still work
-rw-r--r-- | modules/user/user.pages.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index 9262e4271..03bcd0c10 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -43,10 +43,10 @@ function user_pass() { function user_pass_validate($form, &$form_state) { $name = trim($form_state['values']['name']); - if (valid_email_address($name)) { - $account = user_load(array('mail' => $name, 'status' => 1)); - } - else { + // Try to load by email. + $account = user_load(array('mail' => $name, 'status' => 1)); + if (!$account) { + // No success, try to load by name. $account = user_load(array('name' => $name, 'status' => 1)); } if (isset($account->uid)) { |