summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-08-26 08:00:49 +0000
committerDries Buytaert <dries@buytaert.net>2007-08-26 08:00:49 +0000
commit7531f956aa542558d601a3d4f3039f4041793ec0 (patch)
treeff74cc499d577b04f8cb3bcaa2b7589d634b02aa /modules
parent5e73b66f3a00d42567b8d6b35ee821788428dc75 (diff)
downloadbrdo-7531f956aa542558d601a3d4f3039f4041793ec0.tar.gz
brdo-7531f956aa542558d601a3d4f3039f4041793ec0.tar.bz2
- Patch #169627 by JirkaRybka: improved logging of mail problems.
Diffstat (limited to 'modules')
-rw-r--r--modules/user/user.module13
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 56200b84e..3c57fea1e 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1331,15 +1331,10 @@ function user_pass_submit($form, &$form_state) {
$account = $form_state['values']['account'];
// Mail one time login URL and instructions using current language.
- $mail_success = _user_mail_notify('password_reset', $account, $language);
- if ($mail_success) {
- 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.'));
- }
- else {
- watchdog('user', 'Error mailing password reset instructions to %name at %email.', array('%name' => $account->name, '%email' => $account->mail), WATCHDOG_ERROR);
- drupal_set_message(t('Unable to send mail. Please contact the site admin.'));
- }
+ _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.'));
+
$form_state['redirect'] = 'user';
return;
}