I have a customer that wants an adminbar to appear on their webpage if they are logged into the backend. I am trying to do this from an UmbracoViewPage, and after some googling, I've found the two following solutions, however they don't seem to work:
HttpContextBase wrapper = new HttpContextWrapper(HttpContext.Current);
UmbracoBackOfficeIdentity user = wrapper.GetCurrentIdentity(true);
bool isLoggedIn = user != null;
How to check if backend user is logged in?
I have a customer that wants an adminbar to appear on their webpage if they are logged into the backend. I am trying to do this from an UmbracoViewPage, and after some googling, I've found the two following solutions, however they don't seem to work:
This always returns false.
CurrrentUser is always null.
Any help would be appreciated!
I found the solution:
is working on a reply...