Hey, we are migrating a site from v9 to v10.  However, we need the site to be 'locked down' meaning that the webpage must prompt you for a username and password before even letting you see the website. Is there a JS object running arround with a IsUserLoggedIn?

We need the every page to redirect to login when the is not logged in.
in General by (200 points)

1 Answer

+1 vote

If you're using xml packages you can do something like this,  though this does not do the redirect it might be something you might want. 

 <xsl:variable name="CurrentUrl" select="/root/Runtime/PageName" />
<xsl:if test="/root/System/CustomerFirstName='' ">
                    <!--YOUR CONTENT-->
                    <p class="strong">
                      We sell to licensed professionals only.<br />
                      Please login or register:
                      <a class="btn btn-primary" id="CurrentURL" runat="server" href="/signin.aspx?ReturnURL={$CurrentUrl}">LOGIN</a>
                      <a class="btn btn-secondary" href="/createaccount.aspx">REGISTER</a>


by (215 points)