UserProperties is always null

akhilat9657589 30-01-2019

Hi All,

We are using AEM There are 2 publish instances and we have configured SCD.

We use below code to get logged in user details.

UserPropertiesManager upm = userPropertiesService.createUserPropertiesManager(resourceResolver);

Session session = slingRequest.getResourceResolver().adaptTo(Session.class);

UserProperties userProperties = upm.getUserProperties(session.getUserID(), "profile");

When ever we are trying to access site via dispatcher userProperties is always becoming null. So we tried giving a null check page is loading with an alert "Your request could not be completed because you have been signed out." and a string /?resource=%2F%3Fresource%3D%252F is getting appended to URL always.

But when ever we are trying to access the site using IPs, it is loading without any exception and userProperties is no null.

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)