-
-
Save sbkinney/6998155 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
$(document).ready(function() { | |
if(HelpCenter.user.role === "anonymous") { | |
window.location.replace("/access/unauthenticated?return_to=" + encodeURIComponent(window.location.pathname) + "&theme=hc"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment