Ticket #28435: 28435.3.diff
File 28435.3.diff, 1.2 KB (added by , 10 years ago) |
---|
-
src/wp-includes/user-functions.php
1602 1602 // Escape data pulled from DB. 1603 1603 $user = add_magic_quotes( $user ); 1604 1604 1605 if ( ! empty( $userdata['user_pass'])) {1605 if ( ! empty( $userdata['user_pass'] ) && $userdata['user_pass'] !== $user_obj->user_pass ) { 1606 1606 // If password is changing, hash it now 1607 1607 $plaintext_pass = $userdata['user_pass']; 1608 1608 $userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] ); -
tests/phpunit/tests/user.php
954 954 955 955 wp_new_user_notification( $user, 'this_is_deprecated' ); 956 956 } 957 /** 958 * @ticket 28435 959 */ 960 function test_wp_update_user_no_change_pwd() { 961 $testuserid = 1; 962 $user = get_userdata( $testuserid ); 963 $pwd_before = $user->user_pass; 964 wp_update_user( $user ); 965 // Reload the data 966 $user = get_userdata( $testuserid ); 967 $pwd_after = $user->user_pass; 968 $this->assertEquals( $pwd_before, $pwd_after ); 969 } 957 970 }