Hide an image when user logs

2 Comments

  • Diziana
    Comment actions Permalink

    Hi Julian,

    You can refer to this https://support.zendesk.com/hc/en-us/community/posts/204591107-Restrict-Custom-block-at-home-page-based-on-user-group.

    I believe you would find what you are looking for.

    Let me know if you face an issue.

    Cheers,

    Diziana

     

    0
  • Tal Admon
    Comment actions Permalink

    Hi Diziana,

    Thanks for referring to your post!

    I'd add that if you want to execute the script only when the current user is anonymous (before logging in) you can use:

    if (HelpCenter.user.name==null) { customization_goes_here... }

    @Julian - if you are using the Web Portal and not the Help Center, you should use in your script:

    if  (Zendesk.currentUser.name=="Anonymous user") {customization_goes_here... }

    Hope that helps,
    Tal Admon

     

    0

Please sign in to leave a comment.

Powered by Zendesk