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:
parent
683e079c00
commit
3bac160f13
|
@ -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>');
|
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
||||||
} else {
|
} else {
|
||||||
// send a copy of password change notification to the admin
|
// send a copy of password change notification to the admin
|
||||||
$message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
|
// but check to see if it's the admin whose password we're changing, and skip this
|
||||||
wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_option('blogname')), $message);
|
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');
|
wp_redirect('wp-login.php?checkemail=newpass');
|
||||||
exit();
|
exit();
|
||||||
|
|
Loading…
Reference in New Issue