Make WordPress Core

Ticket #1096: 1096.diff

File 1096.diff, 1.0 KB (added by rob1n, 18 years ago)
  • wp-login.php

     
    194194                die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
    195195        } else {
    196196                // send a copy of password change notification to the admin
    197                 $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
    198                 wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_option('blogname')), $message);
     197                // but check to see if it's the admin whose password we're changing, and skip this
     198                if ($user->user_email != get_settings('admin_email')) {
     199                        $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
     200                        wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_option('blogname')), $message);
     201                }
    199202
    200203                wp_redirect('wp-login.php?checkemail=newpass');
    201204                exit();