diff options
-rw-r--r-- | modules/user.module | 6 | ||||
-rw-r--r-- | modules/user/user.module | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/user.module b/modules/user.module index d20881dd6..3807c070f 100644 --- a/modules/user.module +++ b/modules/user.module @@ -914,9 +914,6 @@ function user_pass() { else if ($edit['mail'] && !($account = user_load(array('mail' => $edit['mail'], 'status' => 1)))) { form_set_error('mail', t('Sorry. The e-mail address %email is not recognized.', array('%email' => '<em>'. $edit['mail'] .'</em>'))); } - else if ($edit) { - drupal_set_message(t('You must provider either a username or e-mail address.'), 'error'); - } if ($account) { $from = variable_get('site_mail', ini_get('sendmail_from')); $pass = user_password(); @@ -942,6 +939,9 @@ function user_pass() { drupal_goto('user'); } else { + if ($edit) { + drupal_set_message(t('You must provider either a username or e-mail address.'), 'error'); + } // Display form: $output = '<p>'. t('Enter your username <strong><em>or</em></strong> your e-mail address.') .'</p>'; $output .= form_textfield(t('Username'), 'name', $edit['name'], 30, 64); diff --git a/modules/user/user.module b/modules/user/user.module index d20881dd6..3807c070f 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -914,9 +914,6 @@ function user_pass() { else if ($edit['mail'] && !($account = user_load(array('mail' => $edit['mail'], 'status' => 1)))) { form_set_error('mail', t('Sorry. The e-mail address %email is not recognized.', array('%email' => '<em>'. $edit['mail'] .'</em>'))); } - else if ($edit) { - drupal_set_message(t('You must provider either a username or e-mail address.'), 'error'); - } if ($account) { $from = variable_get('site_mail', ini_get('sendmail_from')); $pass = user_password(); @@ -942,6 +939,9 @@ function user_pass() { drupal_goto('user'); } else { + if ($edit) { + drupal_set_message(t('You must provider either a username or e-mail address.'), 'error'); + } // Display form: $output = '<p>'. t('Enter your username <strong><em>or</em></strong> your e-mail address.') .'</p>'; $output .= form_textfield(t('Username'), 'name', $edit['name'], 30, 64); |