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
This commit is contained in:
Sergey Biryukov 2018-06-04 13:45:13 +00:00
parent 88df6476cd
commit f4580c122b
1 changed files with 1 additions and 1 deletions

View File

@ -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;