WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 3 months ago

#48313 closed defect (bug) (fixed)

Administration email verification uses the site locale instead of the user's locale

Reported by: TimothyBlynJacobs Owned by: SergeyBiryukov
Milestone: 5.3.1 Priority: normal
Severity: normal Version: 5.3
Component: Users Keywords: has-patch needs-testing fixed-major
Focuses: Cc:
PR Number:

Description

Given a site locale of German, and a user locale of English. When you login in the "Administration email verification" screen is partially in German instead of English.

I think this is because get_user_locale only works in the admin, which wp-login.php doesn't count as.

A possible fix might be to pass wp_lang when building the redirect URL?

<?php
$redirect_to = add_query_arg( array( 'action' => 'confirm_admin_email', 'wp_lang' => $user->locale ), wp_login_url( $redirect_to ) );

Attachments (1)

48313.patch (670 bytes) - added by sathyapulse 3 months ago.
48313.patch

Download all attachments as: .zip

Change History (11)

#1 @SergeyBiryukov
4 months ago

  • Component changed from General to Users

#2 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 5.3.1

@sathyapulse
3 months ago

48313.patch

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


3 months ago

#4 @audrasjb
3 months ago

  • Keywords has-patch needs-testing added

#5 @audrasjb
3 months ago

  • Keywords needs-refresh added

Hi @sathyapulse ,

The patch doesn't apply cleanly, could you generate a new one against wordpress-develop please? thanks!

#6 @audrasjb
3 months ago

  • Keywords needs-refresh removed

Sorry, it's all good.

#7 @SergeyBiryukov
3 months ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#8 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 46788:

Users: Display admin email verification screen in user's locale instead of site locale.

Props sathyapulse, TimothyBlynJacobs.
Fixes #48313.

#9 @SergeyBiryukov
3 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 5.3.1.

#10 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 46789:

Users: Display admin email verification screen in user's locale instead of site locale.

Props sathyapulse, TimothyBlynJacobs.
Merges [46788] to the 5.3 branch.
Fixes #48313.

Note: See TracTickets for help on using tickets.