Skip to content

Instantly share code, notes, and snippets.

Created October 15, 2013 20:28
Show Gist options
  • Save anonymous/6998140 to your computer and use it in GitHub Desktop.
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.
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