Checking for user.roles if it is equal to a specific role and based on that determine the URL Forgot-Password
-
I have a case where I have two websites for the same Fusionauth application
So I am trying to differentiate the Reset-Password URL based on the role
how can I achieve such a case in the template.
I have tried this
[#if user.roles?? && "client" in user.roles] <a href="https://test.com/${changePasswordId}"> Reset Password </a> [#else] <a href="https://test.com/${changePasswordId}"> Reset Password </a> [/#if]
and it refuses to render.
Any help here !
-
@essamkayall1996 Are you able to debug and confirm "client' is in the list of user.roles? Also are you saying that no page renders? What error message are you getting? It looks like in either case of if statement that you are returning the same page.