Hello guys,
This is simple xslt, that shows the login status of the current user. Everything worked fine on development server, but once we've setup app on production, umbraco.librarty.IsLoggedOn() started always to return false.
Application uses method umbraco.libraty.IsLoggedOn() from .NET code and from there it returns proper value, but from xslt doesn't.
<xsl:choose>
<xsl:when test="umbraco.library:IsLoggedOn() = true()">
You are logged in as
<q>
<xsl:variable name="user" select="umbraco.library:GetCurrentMember()/@loginName"/>
<xsl:value-of select="$user"/>
</q>. This is <a href="/profile">your profile</a>.
</xsl:when>
<xsl:otherwise>
You are not logged in.
<a href="/registruj-se">Log in</a>.
</xsl:otherwise>
</xsl:choose>
For non-umbraco developers: the library.IsLoggedOn() function checks HttpContext.Current.User and HttpContext.Current.User.Identity.IsAuthenticated to see if you is logged in or not.
Maybe it is a problem with cookies and XSLT? Anyone have a clue? Tnx