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
This commit is contained in:
parent
43c76d1751
commit
a276eeb68e
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user