Make WordPress Core

Ticket #1096: fix_1096.patch

File fix_1096.patch, 1.2 KB (added by MC_incubus, 21 years ago)
  • wp-login.php

    ==== Patch <fix_1096_trunk> level 1
    Source: [No source]
    Target: 1a063a9b-81f0-0310-95a4-ce76da25c4cd:/trunk:2444 [mirrored]
            (http://svn.automattic.com/wordpress/trunk)
    Log:
    Do not send notification for admin if reset done by admin - #1096
    === wp-login.php
    ==================================================================
     
    151151        } else {
    152152                echo '<p>' .  sprintf(__("Your new password is in the mail."), $user_login) . '<br />';
    153153        echo  "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
    154                 // send a copy of password change notification to the admin
    155                 wp_mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user->user_login));
     154                // send a copy of password change notification to the admin(if we are not the admin:-))
     155                if ($user->user_email!=get_settings('admin_email'))
     156                        wp_mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user->user_login));
    156157                die();
    157158        }
    158159break;