From b666756b8f8d2bb23338cf04fa031df8d35417c9 Mon Sep 17 00:00:00 2001 From: Guilhem Lucas Date: Mon, 14 Jan 2019 12:02:04 +0100 Subject: [PATCH] KEYCLOAK-9320 Make theme properties available in email templates --- .../email/freemarker/FreeMarkerEmailTemplateProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/src/main/java/org/keycloak/email/freemarker/FreeMarkerEmailTemplateProvider.java b/services/src/main/java/org/keycloak/email/freemarker/FreeMarkerEmailTemplateProvider.java index e3e447f996..15cca3a15b 100755 --- a/services/src/main/java/org/keycloak/email/freemarker/FreeMarkerEmailTemplateProvider.java +++ b/services/src/main/java/org/keycloak/email/freemarker/FreeMarkerEmailTemplateProvider.java @@ -204,6 +204,7 @@ public class FreeMarkerEmailTemplateProvider implements EmailTemplateProvider { attributes.put("locale", locale); Properties rb = theme.getMessages(locale); attributes.put("msg", new MessageFormatterMethod(locale, rb)); + attributes.put("properties", theme.getProperties()); String subject = new MessageFormat(rb.getProperty(subjectKey, subjectKey), locale).format(subjectAttributes.toArray()); String textTemplate = String.format("text/%s", template); String textBody;