Umbraco 9 Get current user?

Hey community,

Is there no native way of getting access to the current user in umbraco 9?
I am currently upgrading a plugin from Umbraco 8 - 9 and in the old code the user was fetched like this:

using Umbraco.Web.Composing;


var user = Current.UmbracoContext.Security.CurrentUser;

this dosnt work in .NET 6.0, atleast i couldnt make it work for some reason, does anyone know where this have been moved? or what i can use to get a similar effect?


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/108559-umbraco-9-get-current-user