Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
Hi Kristoffer,
This is how it's done in CMS 12:
// constructor injection...
private readonly IPrincipalAccessor _principalAccessor;
private readonly IUserMembershipService _userMembershipService;
...
var userMembershipInfo = await _userMembershipService.GetUser(_principalAccessor.CurrentName());
var language = userMembershipInfo.Language;
Hope this helps!
Thanks Dejan!
I guess this should be ok to:
var userMembershipInfo = _userMembershipService.GetUser(User.Identity.Name);
/Kristoffer
Hi!
In CMS 11 I could get the logged in persons languagesettings usign this:
How is this done in CMS 12? I cannot find anything in the documentation?
Thanks!
/Kristoffer