WordPress.org

Make WordPress Core

Ticket #13351: 13351.patch

File 13351.patch, 1.0 KB (added by SergeyBiryukov, 6 years ago)
  • wp-admin/includes/user.php

     
    331331        if ( ! get_user_option('default_password_nag', $user_ID) ) //Short circuit it.
    332332                return;
    333333
    334         $new_data = get_userdata($user_ID);
     334        $new_data = new WP_User($user_ID);
    335335
    336336        if ( $new_data->user_pass != $old_data->user_pass ) { //Remove the nag if the password has been changed.
    337337                delete_user_setting('default_password_nag', $user_ID);
  • wp-includes/pluggable.php

     
    579579 * @return string Authentication cookie contents
    580580 */
    581581function wp_generate_auth_cookie($user_id, $expiration, $scheme = 'auth') {
    582         $user = get_userdata($user_id);
     582        $user = new WP_User($user_id);
    583583
    584584        $pass_frag = substr($user->user_pass, 8, 4);
    585585