Skip to content

Conversation

@kasparsd
Copy link
Collaborator

@kasparsd kasparsd commented Dec 22, 2025

What?

Keep the existing Enter %1$s to log in. as standalone string to ensure it works with existing translations. Add the new helper text in own line Didn't expect this? A user from %1$s has successfully authenticated as %2$s. If this wasn't you, please change your password..

Why?

Follow-up to #728.

How?

Testing Instructions

Screenshots or screencast

This now keeps the existing translations for the main sentence:

translation

Changelog Entry

Added - New feature.
Changed - Existing functionality.
Deprecated - Soon-to-be removed feature.
Removed - Feature.
Fixed - Bug fix.
Security - Vulnerability.

/**
* Get the client IP address for the current request.
*
* Note that the IP address is used only for information purposes
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain the expected setup for this and known limitations.

),
$token,
/* translators: %1$s: token */
__( 'Enter %1$s to log in.', 'two-factor' ),
Copy link
Collaborator Author

@kasparsd kasparsd Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this string as it was to ensure that the existing translations keep working.

*/
public function pre_process_authentication( $user ) {
if ( isset( $user->ID ) && isset( $_REQUEST[ self::INPUT_NAME_RESEND_CODE ] ) ) {
if ( isset( $user->ID ) && isset( $_REQUEST[ self::INPUT_NAME_RESEND_CODE ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- non-distructive option that relies on user state.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed the rest of PHPCS warnings for the file.

@kasparsd kasparsd merged commit 2926ece into master Dec 22, 2025
54 checks passed
@kasparsd kasparsd deleted the fix-email-format branch December 22, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants