WordPress.org

Make WordPress Core

Ticket #34180: 34180.patch

File 34180.patch, 671 bytes (added by ocean90, 4 years ago)
  • src/wp-includes/user.php

     
    19711971        $hashed = time() . ':' . $wp_hasher->HashPassword( $key );
    19721972        $key_saved = $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
    19731973        if ( false === $key_saved ) {
    1974                 return WP_Error( 'no_password_key_update', __( 'Could not save password reset key to database.' ) );
     1974                return new WP_Error( 'no_password_key_update', __( 'Could not save password reset key to database.' ) );
    19751975        }
    19761976
    19771977        return $key;