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

Built from https://develop.svn.wordpress.org/trunk@25203


git-svn-id: http://core.svn.wordpress.org/trunk@25175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-09-02 03:18:10 +00:00
parent 259ee74782
commit b1dc91c447
1 changed files with 5 additions and 4 deletions

View File

@ -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 );
}
/**