I am creating an email theme for keycloak. So, when a user forgets their password and requests for a link to reset it; an email is sent to the user.
Now, I am cutomizing the email that he/she gets. I want to add the user's name. Can I do that?
I do have access to variables including: link to reset password link expiration time realm name
How do I get the user's name so that the email template says
Hello John,
blah blah blah
You can add user.username
in your .ftl
file
open (email/text) *.ftl
file and add user.username as one of the parameter like
${msg("passwordResetBody",link, linkExpiration, realmName,user.username)}
and then update actual message body at (email/messages/messages_en.properties) with parameter number like {2} or {3} (in this case it is {3} )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With