WordPress.org

Make WordPress Core

Ticket #45830: 45830.dif

File 45830.dif, 525 bytes (added by couling, 2 years ago)
Line 
11790,1792d1789
2<  * It is possible to update a user's password by specifying the 'user_pass'
3<  * value in the $userdata parameter array.
4<  *
51831,1834c1828,1829
6<       if ( ! empty( $userdata['user_pass'] ) && $userdata['user_pass'] !== $user_obj->user_pass ) {
7<               // If password is changing, hash it now
8<               $plaintext_pass = $userdata['user_pass'];
9<               $userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] );
10---
11>       if ( ! empty( $userdata['user_pass'] ) ) {
12>               wp_set_password( $userdata['user_pass'], $ID );