Created
October 15, 2013 20:28
-
-
Save anonymous/6998140 to your computer and use it in GitHub Desktop.
Code snippet for Help Center that allows for forced redirect to the login page if the current user is anonymous/unauthenticated.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(HelpCenter.user.role === "anonymous") { | |
window.location.href("/access/unauthenticated?return_to=%2Fhc%2Fen-us&theme=hc"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment