Make WordPress Core


Ignore:
Timestamp:
08/01/2019 05:24:20 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Users: Use wp_update_user() in get_password_reset_key().

Props jayswadas, spacedmonkey, donmhico, SergeyBiryukov.
Fixes #45746.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/auth.php

    r43571 r45714  
    228228
    229229    /**
     230     * @ticket 45746
     231     */
     232    function test_user_activation_key_is_saved() {
     233        $user = get_userdata( $this->user->ID );
     234        $key  = get_password_reset_key( $user );
     235
     236        // A correctly saved key should be accepted
     237        $check = check_password_reset_key( $key, $this->user->user_login );
     238        $this->assertNotWPError( $check );
     239        $this->assertInstanceOf( 'WP_User', $check );
     240        $this->assertSame( $this->user->ID, $check->ID );
     241    }
     242
     243    /**
    230244     * @ticket 32429
    231245     */
Note: See TracChangeset for help on using the changeset viewer.