diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 1c1e466..6fb9dc2 100644
a
|
b
|
|
1820 | 1820 | // Escape data pulled from DB. |
1821 | 1821 | $user = add_magic_quotes( $user ); |
1822 | 1822 | |
1823 | | if ( ! empty( $userdata['user_pass'] ) && $userdata['user_pass'] !== $user_obj->user_pass ) { |
1824 | | // If password is changing, hash it now |
1825 | | $plaintext_pass = $userdata['user_pass']; |
| 1823 | if ( ! empty( $userdata['user_pass'] ) && ! wp_check_password( $userdata['user_pass'], $user_obj->user_pass, $ID ) ) { |
| 1824 | |
| 1825 | // Used downstream to clear cookies. |
| 1826 | $changed_password = true; |
| 1827 | |
| 1828 | // wp_insert_user() expects new password to be hashed already. |
1826 | 1829 | $userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] ); |
1827 | 1830 | |
1828 | 1831 | /** |
… |
… |
|
1993 | 1996 | // Update the cookies if the password changed. |
1994 | 1997 | $current_user = wp_get_current_user(); |
1995 | 1998 | if ( $current_user->ID == $ID ) { |
1996 | | if ( isset($plaintext_pass) ) { |
| 1999 | if ( isset($changed_password) ) { |
1997 | 2000 | wp_clear_auth_cookie(); |
1998 | 2001 | |
1999 | 2002 | // Here we calculate the expiration length of the current auth cookie and compare it to the default expiration. |