Display user's group name/id | Community
Skip to main content
armanm32055672
Level 2
October 13, 2017
Solved

Display user's group name/id

  • October 13, 2017
  • 1 reply
  • 1576 views

Hi,

I am trying to display user's id and the user's group id/name on to a page. Right now I am displaying who is logged in with ${currentSession.userID}. How can I also display this user's group id/name onto this page?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by VeenaVikraman

Hi Arman

     I have not worked with the users in AEM for very long time. But I don't believe anything might have deprecated much in last 2 years. I could find some documentation for you from the Internet.

  Please read the below blogs and I believe this can help.

How to get the UserInfo through Java API in Adobe CQ5

You can use memberOf() method of the User (Adobe AEM 6.0.0 API 6.0.0 API) and Authorizable (Adobe AEM 6.0.0 API 6.0.0 API)

This will return you the list of groups the user is added to

Thanks

Veena

1 reply

VeenaVikraman
Community Advisor
VeenaVikramanCommunity AdvisorAccepted solution
Community Advisor
October 13, 2017

Hi Arman

     I have not worked with the users in AEM for very long time. But I don't believe anything might have deprecated much in last 2 years. I could find some documentation for you from the Internet.

  Please read the below blogs and I believe this can help.

How to get the UserInfo through Java API in Adobe CQ5

You can use memberOf() method of the User (Adobe AEM 6.0.0 API 6.0.0 API) and Authorizable (Adobe AEM 6.0.0 API 6.0.0 API)

This will return you the list of groups the user is added to

Thanks

Veena