A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
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