Passing user name in email verification template

Hi team, I want to send the verification email to user when he creates account. I want to customize the email template ,css and want to pass the user name in the template to whom email will be sent. How can i do so?

Ex.

Hi <user_name>,

Click button below to verify your email account.

Hello,

Think you have to make a new theme, perhaps something like this may help.

I have created the new theme, but not able to figer out how I get ther username so that I can send it in email to user

if you use existing email template. keycloak themes email folder your can find ftl files in there you can find ${kcSanitize(msg(“passwordResetBodyHtml”,link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration)))?no_esc} this kind of code . inside this code you can add users username like this ${kcSanitize(msg(“passwordResetBodyHtml”,link, linkExpiration, realmName, linkExpirationFormatter(linkExpiration),user.username))?no_esc}

Thanks it worked. Btw it’s user.userName(). I checked the code it’s a function which we need to call .