FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Checking for user.roles if it is equal to a specific role and based on that determine the URL Forgot-Password

    Scheduled Pinned Locked Moved Unsolved
    General Discussion
    2
    2
    540
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      essamkayall1996
      last edited by

      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 !

      mark.robustelliM 1 Reply Last reply Reply Quote 0
      • mark.robustelliM
        mark.robustelli @essamkayall1996
        last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post