UserProperties is always null

Avatar

Avatar

akhilat9657589

Avatar

akhilat9657589

akhilat9657589

30-01-2019

Hi All,

We are using AEM 6.3.3.0. 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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

30-01-2019

You are using UserManager API. DO you have an OSGi bundle containing this API on the AEM PUB instance?