Get User Properties always returns null

I just try to get user properties and write them to the console. But this fails, it’s always returning “null”.

This is my code:

UserPropertyManager userPropertyManager = ComponentAccessor.getUserPropertyManager();
PropertySet ps = userPropertyManager.getPropertySet(getLoggedInUser());
String navisionUser = ps.getText("NavisionUser");

I imported those classes:

import com.atlassian.jira.user.UserPropertyManager;
import com.opensymphony.module.propertyset.*; <-- I don't know if I need that?

What is wrong about that?
Thanks a lot in advance :slight_smile: