Umbraco 8 Can I check if a user is logged in within a razor view?
Does any one know how to check if a backend 'User' is logged in from within a razor View?
I have code that checks the membership but this just seems to be working for members and not backend users.
I am hoping someone can point me in the right direction.
var userTicket = new System.Web.HttpContextWrapper(System.Web.HttpContext.Current).GetUmbracoAuthTicket();
if (userTicket == null)
{
//the user is not autenticated
}
Umbraco 8 Can I check if a user is logged in within a razor view?
Does any one know how to check if a backend 'User' is logged in from within a razor View? I have code that checks the membership but this just seems to be working for members and not backend users. I am hoping someone can point me in the right direction.
Hi Nathan,
This should help you.
Kind Regards
David
is working on a reply...