Users: Add user’s locale to password reset link to ensure login screen matches the language of the email.

Props walbo.
See #34281, #52605.
Fixes #53321.
Built from https://develop.svn.wordpress.org/trunk@51077


git-svn-id: http://core.svn.wordpress.org/trunk@50686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2021-06-06 12:41:01 +00:00
parent 5fac9d83a9
commit ce4da03303
2 changed files with 2 additions and 2 deletions

View File

@ -2799,7 +2799,7 @@ function retrieve_password( $user_login = null ) {
$message .= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n\r\n";
$message .= __( 'If this was a mistake, ignore this email and nothing will happen.' ) . "\r\n\r\n";
$message .= __( 'To reset your password, visit the following address:' ) . "\r\n\r\n";
$message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . "\r\n\r\n";
$message .= network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . '&wp_lang=' . $locale . "\r\n\r\n";
if ( ! is_user_logged_in() ) {
$requester_ip = $_SERVER['REMOTE_ADDR'];

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-51076';
$wp_version = '5.8-alpha-51077';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.