Make WordPress Core

Changeset 25203


Ignore:
Timestamp:
09/02/2013 03:17:34 AM (11 years ago)
Author:
SergeyBiryukov
Message:

Clear 'default_password_nag' flag when resetting a user's password, since the new password is entered manually. props wikicms. fixes #25206.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r25174 r25203  
    304304 * @param string $new_pass New password for the user in plaintext
    305305 */
    306 function reset_password($user, $new_pass) {
    307     do_action('password_reset', $user, $new_pass);
    308 
    309     wp_set_password($new_pass, $user->ID);
    310 
    311     wp_password_change_notification($user);
     306function reset_password( $user, $new_pass ) {
     307    do_action( 'password_reset', $user, $new_pass );
     308
     309    wp_set_password( $new_pass, $user->ID );
     310    update_user_option( $user->ID, 'default_password_nag', false, true );
     311
     312    wp_password_change_notification( $user );
    312313}
    313314
Note: See TracChangeset for help on using the changeset viewer.