Reputation: 1
I'm customizing the executeAction.ftl
template in Keycloak to change the email content based on the action that triggered the email (e.g., UPDATE_PASSWORD, VERIFY_EMAIL). However, I'm facing an issue where the action variable seems to be undefined. Even using a null check or default value doesn't resolve the problem, and it always goes to the else clause.
<#-- Header -->
<#include "header.ftl">
<#-- Email content -->
<div class="content">
<p>Hello ${user.firstName},</p>
<#-- Check which action generated the email -->
<#if (action == "UPDATE_PASSWORD")>
<p>We have received a request to update your password. Please click the link below to update your password:</p>
<#elseif (action == "VERIFY_EMAIL")>
<p>Please verify your email address by clicking the link below:</p>
<#elseif (action == "UPDATE_PROFILE")>
<p>Please update your profile by clicking the link below:</p>
<#else>
<p>Please click the link below to complete the requested action:</p>
</#if>
<p><a href="${link}">${link}</a></p>
<p>Thank you,<br/>
The Support Team</p>
</div>
<#-- Footer -->
<#include "footer.ftl">
Upvotes: 0
Views: 146