Im trying to create an xslt macro with the help of dandrayne to check whether the user is logged in or not. If they are logged in they can post comments to a blog post, but if not it will require them to login. How ever I cant find what I'm doing wrong.
Here is the error:
Error occured
System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.BusinessLogic.StateHelper.GetCookieValue(HttpContext context, String key) at umbraco.BusinessLogic.StateHelper.HasCookieValue(String key) at umbraco.cms.businesslogic.member.Member.CurrentMemberId() at umbraco.cms.businesslogic.member.Member.IsLoggedOn() at umbraco.library.IsLoggedOn()
umbraco.library:IsLoggedOn() Error
Hi,
Im trying to create an xslt macro with the help of dandrayne to check whether the user is logged in or not. If they are logged in they can post comments to a blog post, but if not it will require them to login. How ever I cant find what I'm doing wrong.
Here is the error:
Here is the xslt code:
Try changing
<xsl:when test="umbraco.library:IsLoggedOn() = true()">
Original post by Dougloas Robar
http://our.umbraco.org/forum/using/ui-questions/3495-umbracolibraryIsLoggedOn%28%29-returns-NullReferenceException
Also are there members setup already?
Hi Tom,
Yes members are already setup. I'll try your suggestion.
Thank you.
Regards,
Harry
Hi Tom,
It still gives me the same error.
Hey Harry,
Do you have Member Types and member groups set up?
Does this fail when both logged in and not logged in?
Jay
It gives me this error when I try to save the xslt that I created.
is working on a reply...