summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-09-05 11:59:23 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-09-05 11:59:23 -0700
commit81bf47868ea69c5cc2cbf90be8cecb2d5549e88b (patch)
treed26e4b499a33d3f18d5ec24b7201401f1196fb00
parent2c25c781ee646c738e051e26886ffef518031ed0 (diff)
downloadbrdo-81bf47868ea69c5cc2cbf90be8cecb2d5549e88b.tar.gz
brdo-81bf47868ea69c5cc2cbf90be8cecb2d5549e88b.tar.bz2
Issue #1069778 by msonnabaum: Fixed Conflicting messages from user_pass_submit().
-rw-r--r--modules/user/user.pages.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc
index 697a82d2c..25f4528f0 100644
--- a/modules/user/user.pages.inc
+++ b/modules/user/user.pages.inc
@@ -76,9 +76,11 @@ function user_pass_submit($form, &$form_state) {
$account = $form_state['values']['account'];
// Mail one time login URL and instructions using current language.
- _user_mail_notify('password_reset', $account, $language);
- watchdog('user', 'Password reset instructions mailed to %name at %email.', array('%name' => $account->name, '%email' => $account->mail));
- drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
+ $mail = _user_mail_notify('password_reset', $account, $language);
+ if (!empty($mail)) {
+ watchdog('user', 'Password reset instructions mailed to %name at %email.', array('%name' => $account->name, '%email' => $account->mail));
+ drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
+ }
$form_state['redirect'] = 'user';
return;