Commit 33e80247 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#135329 follow up: rolling back some of the user password request form...

#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
parent 5362c163
......@@ -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)) {
......
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