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; page = LoginFormsPages.LOGIN_UPDATE_PASSWORD;
break; break;
case VERIFY_EMAIL: case VERIFY_EMAIL:
UpdateProfileContext userBasedContext1 = new UserUpdateProfileContext(realm,user);
attributes.put("user",new ProfileBean(userBasedContext1,formData));
actionMessage = Messages.VERIFY_EMAIL; actionMessage = Messages.VERIFY_EMAIL;
page = LoginFormsPages.LOGIN_VERIFY_EMAIL; page = LoginFormsPages.LOGIN_VERIFY_EMAIL;
break; break;

View file

@ -266,7 +266,7 @@ public class RequiredActionsTest extends AbstractLoginTest {
while (true) { while (true) {
assertTrue(verifyEmailPage.feedbackMessage().isWarning()); assertTrue(verifyEmailPage.feedbackMessage().isWarning());
assertEquals("[TEST LOCALE] je třeba ověřit emailovou adresu", verifyEmailPage.feedbackMessage().getText()); 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) { if (firstAttempt) {
verifyEmailPage.clickResend(); verifyEmailPage.clickResend();

View file

@ -295,7 +295,7 @@ public class LoginSettingsTest extends AbstractRealmTest {
testAccountPage.navigateTo(); testAccountPage.navigateTo();
testRealmLoginPage.form().login(testUser); 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()); testRealmVerifyEmailPage.getInstructionMessage());
log.info("verified verify email is enabled"); log.info("verified verify email is enabled");

View file

@ -3,7 +3,7 @@
<#if section = "header"> <#if section = "header">
${msg("emailVerifyTitle")} ${msg("emailVerifyTitle")}
<#elseif section = "form"> <#elseif section = "form">
<p class="instruction">${msg("emailVerifyInstruction1")}</p> <p class="instruction">${msg("emailVerifyInstruction1",user.email)}</p>
<#elseif section = "info"> <#elseif section = "info">
<p class="instruction"> <p class="instruction">
${msg("emailVerifyInstruction2")} ${msg("emailVerifyInstruction2")}

View file

@ -146,7 +146,7 @@ oauth2DeviceVerificationFailedMessage=You may close this browser window and go b
oauth2DeviceConsentDeniedMessage=Consent denied for connecting the device. 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. 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? emailVerifyInstruction2=Haven''t received a verification code in your email?
emailVerifyInstruction3=to re-send the email. emailVerifyInstruction3=to re-send the email.