From a276eeb68e6463ce6f2607e8b84a95cafa125463 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 2 Sep 2013 03:17:34 +0000 Subject: [PATCH] Clear 'default_password_nag' flag when resetting a user's password, since the new password is entered manually. props wikicms. fixes #25206. git-svn-id: https://develop.svn.wordpress.org/trunk@25203 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wp-login.php b/src/wp-login.php index 7fcf9d663a..a0aebd0e27 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -303,12 +303,13 @@ function check_password_reset_key($key, $login) { * @param object $user The user * @param string $new_pass New password for the user in plaintext */ -function reset_password($user, $new_pass) { - do_action('password_reset', $user, $new_pass); +function reset_password( $user, $new_pass ) { + do_action( 'password_reset', $user, $new_pass ); - wp_set_password($new_pass, $user->ID); + wp_set_password( $new_pass, $user->ID ); + update_user_option( $user->ID, 'default_password_nag', false, true ); - wp_password_change_notification($user); + wp_password_change_notification( $user ); } /**