This method returns a User Type and not a User. Try this:
var userTicket = new System.Web.HttpContextWrapper(System.Web.HttpContext.Current).GetUmbracoAuthTicket();
if (userTicket != null) {
var currentUser = ApplicationContext.Services.UserService.GetByUsername(userTicket.Name);
}
How to get UserId - Membership
Hi folks, how do you get the userId, I have tried the following but receiving an error
Cannot convert method group ‘GetUserTypeById to non-delegate typeIUser
This method returns a User Type and not a User. Try this:
is working on a reply...