Display email address in login-verify-email.ftl (#10870)

Closes #8873
This commit is contained in:
iingawal 2022-03-23 17:14:21 +05:30 committed by GitHub
parent 78549fe024
commit b773857a80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 5 deletions

View file

@ -174,6 +174,8 @@ public class FreeMarkerLoginFormsProvider implements LoginFormsProvider {
page = LoginFormsPages.LOGIN_UPDATE_PASSWORD;
break;
case VERIFY_EMAIL:
UpdateProfileContext userBasedContext1 = new UserUpdateProfileContext(realm,user);
attributes.put("user",new ProfileBean(userBasedContext1,formData));
actionMessage = Messages.VERIFY_EMAIL;
page = LoginFormsPages.LOGIN_VERIFY_EMAIL;
break;

View file

@ -266,7 +266,7 @@ public class RequiredActionsTest extends AbstractLoginTest {
while (true) {
assertTrue(verifyEmailPage.feedbackMessage().isWarning());
assertEquals("[TEST LOCALE] je třeba ověřit emailovou adresu", verifyEmailPage.feedbackMessage().getText());
assertEquals("An email with instructions to verify your email address has been sent to you.", verifyEmailPage.getInstructionMessage());
assertEquals("An email with instructions to verify your email address has been sent to your address test@email.test.", verifyEmailPage.getInstructionMessage());
if (firstAttempt) {
verifyEmailPage.clickResend();

View file

@ -295,7 +295,7 @@ public class LoginSettingsTest extends AbstractRealmTest {
testAccountPage.navigateTo();
testRealmLoginPage.form().login(testUser);
Assert.assertEquals("An email with instructions to verify your email address has been sent to you.",
Assert.assertEquals("An email with instructions to verify your email address has been sent to your address test@email.test.",
testRealmVerifyEmailPage.getInstructionMessage());
log.info("verified verify email is enabled");

View file

@ -3,7 +3,7 @@
<#if section = "header">
${msg("emailVerifyTitle")}
<#elseif section = "form">
<p class="instruction">${msg("emailVerifyInstruction1")}</p>
<p class="instruction">${msg("emailVerifyInstruction1",user.email)}</p>
<#elseif section = "info">
<p class="instruction">
${msg("emailVerifyInstruction2")}
@ -11,4 +11,4 @@
<a href="${url.loginAction}">${msg("doClickHere")}</a> ${msg("emailVerifyInstruction3")}
</p>
</#if>
</@layout.registrationLayout>
</@layout.registrationLayout>

View file

@ -146,7 +146,7 @@ oauth2DeviceVerificationFailedMessage=You may close this browser window and go b
oauth2DeviceConsentDeniedMessage=Consent denied for connecting the device.
oauth2DeviceAuthorizationGrantDisabledMessage=Client is not allowed to initiate OAuth 2.0 Device Authorization Grant. The flow is disabled for the client.
emailVerifyInstruction1=An email with instructions to verify your email address has been sent to you.
emailVerifyInstruction1=An email with instructions to verify your email address has been sent to your address {0}.
emailVerifyInstruction2=Haven''t received a verification code in your email?
emailVerifyInstruction3=to re-send the email.