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
This commit is contained in:
markjaquith 2007-02-21 02:08:28 +00:00
parent 683e079c00
commit 3bac160f13
1 changed files with 5 additions and 2 deletions

View File

@ -194,8 +194,11 @@ case 'rp' :
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
} 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();