Skip to content

Instantly share code, notes, and snippets.

@rhysgodfrey
Created December 30, 2012 14:47
Show Gist options
  • Save rhysgodfrey/4413111 to your computer and use it in GitHub Desktop.
Save rhysgodfrey/4413111 to your computer and use it in GitHub Desktop.
Telligent Enterprise Simple Redirect to Login Scripted Content Fragment
#set($urlName = $core_v2_urls.Current)
#set($isRegistered = $core_v2_user.IsRegistered($core_v2_user.Accessing.Id))
## List of pages anonymous users are allowed to access
#set($allowedPages = [ "LogIn", "LogOut", "Message", "GetForgottenPassword", "AddUser" ])
#if(!$isRegistered && !$allowedPages.Contains($urlName))
$core_v2_page.Redirect($core_v2_urls.LogIn())
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment