From 3bac160f13591d72681e0bac23de916e2d064001 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 21 Feb 2007 02:08:28 +0000 Subject: [PATCH] refrain from notifying the administrator of administrator password changes (it is redundant). Props rob1n for the patch refresh. fixes #1096 git-svn-id: http://svn.automattic.com/wordpress/trunk@4902 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-login.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-login.php b/wp-login.php index a92815da3..0afb2a55e 100644 --- a/wp-login.php +++ b/wp-login.php @@ -194,8 +194,11 @@ case 'rp' : die('

' . __('The e-mail could not be sent.') . "
\n" . __('Possible reason: your host may have disabled the mail() function...') . '

'); } else { // send a copy of password change notification to the admin - $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n"; - wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_option('blogname')), $message); + // but check to see if it's the admin whose password we're changing, and skip this + if ($user->user_email != get_settings('admin_email')) { + $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n"; + wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_option('blogname')), $message); + } wp_redirect('wp-login.php?checkemail=newpass'); exit();