WordPress.org

Make WordPress Core

Ticket #22114: patch-wordpress-users.patch

File patch-wordpress-users.patch, 556 bytes (added by ChloeD, 3 years ago)

Patch (wp-includes/user.php) for propagating cleartext passwords through an action

Line 
1--- wordpress/wp-includes/user.php      2012-04-27 17:57:51.000000000 +0200
2+++ web/wp-includes/user.php    2012-10-06 10:21:03.603898227 +0200
3@@ -1423,6 +1423,9 @@ function wp_update_user($userdata) {
4                $userdata = array_merge($user, $userdata);
5                $user_id = wp_insert_user($userdata);
6
7+               // call password_updated to reflect that change elsewhere if needed
8+               do_action('password_updated', $ID, $plaintext_pass);
9+
10                // Update the cookies if the password changed.
11                $current_user = wp_get_current_user();
12                if ( $current_user->ID == $ID ) {