From f4580c122b7d0d2d66d22f806c6fe6e11023c6f0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 4 Jun 2018 13:45:13 +0000 Subject: [PATCH] Users: In `wp_validate_user_request_key()`, properly return the `WP_Error` object in case the confirmation email has expired. Props itowhid06. Fixes #44298. git-svn-id: https://develop.svn.wordpress.org/trunk@43331 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 566702f4fc..d309e2f0a7 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -3509,7 +3509,7 @@ function wp_validate_user_request_key( $request_id, $key ) { } if ( ! $expiration_time || time() > $expiration_time ) { - $return = new WP_Error( 'expired_key', __( 'The confirmation email has expired.' ) ); + return new WP_Error( 'expired_key', __( 'The confirmation email has expired.' ) ); } return true;