#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

6.x
Gábor Hojtsy 2008-01-02 12:57:37 +00:00
parent 5362c16386
commit 33e8024752
1 changed files with 4 additions and 4 deletions

View File

@ -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)) {