mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Users: Use wp_update_user() in get_password_reset_key().
Props jayswadas, spacedmonkey, donmhico, SergeyBiryukov. Fixes #45746. git-svn-id: https://develop.svn.wordpress.org/trunk@45714 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -226,6 +226,20 @@ class Tests_Auth extends WP_UnitTestCase {
|
||||
$this->assertInstanceOf( 'WP_Error', $user );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 45746
|
||||
*/
|
||||
function test_user_activation_key_is_saved() {
|
||||
$user = get_userdata( $this->user->ID );
|
||||
$key = get_password_reset_key( $user );
|
||||
|
||||
// A correctly saved key should be accepted
|
||||
$check = check_password_reset_key( $key, $this->user->user_login );
|
||||
$this->assertNotWPError( $check );
|
||||
$this->assertInstanceOf( 'WP_User', $check );
|
||||
$this->assertSame( $this->user->ID, $check->ID );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 32429
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user