Make WordPress Core

Ticket #44601: 44601.2.diff

File 44601.2.diff, 639 bytes (added by edocev, 7 years ago)
  • src/wp-includes/user.php

     
    21962196function get_password_reset_key( $user ) {
    21972197        global $wpdb, $wp_hasher;
    21982198
     2199        //Validating whether $user is what it is expected to be
     2200        if ( ! ( $user instanceof WP_User ) ) {
     2201                return new WP_Error( 'invalid_user_data', __( 'Invalid user data' ) );
     2202        }
     2203
    21992204        /**
    22002205         * Fires before a new password is retrieved.
    22012206         *
     
    22222227                $allow = false;
    22232228        }
    22242229
     2230
    22252231        /**
    22262232         * Filters whether to allow a password to be reset.
    22272233         *