I'm trying to get the current logged in User in the backoffice..
I'm using an Auth that I found for Hangfire..
Current.UmbracoContext.Security.CurrentUser return null... The same is with the http.GetUmbracoAuthTicket(9;
public bool Authorize(DashboardContext context)
{
var http = new HttpContextWrapper(HttpContext.Current);
var ticket = http.GetUmbracoAuthTicket();
http.AuthenticateCurrentRequest(ticket, true);
var user = Current.UmbracoContext.Security.CurrentUser;
return user != null && user.Groups.Any(g => g.Alias == "admin" || g.Alias == "subAdmin");
}
Backoffice Auth Umbraco 8
Hey
I'm trying to get the current logged in User in the backoffice..
I'm using an Auth that I found for Hangfire..
Current.UmbracoContext.Security.CurrentUser return null... The same is with the http.GetUmbracoAuthTicket(9;
Anyone else that have done some similar ??
You can try the following to get the current logged in User:
Hope it helps
is working on a reply...