Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: How to get a user list from a Id role ?
Hello,
Actually, I created in Liferay Administration a role, an user, a user
group.
I assigned the user to user group and the user group to
the role.
In my code, I have the role Id and I would like to find my user from
this data (roleId).
The wanted way will be : Role -> User
Group -> User if it's possible.
Do you have an idea to solve my problem ?
Best regards,
Le Mignant Hugo
I think you can get this info with a few calls. I'm not 100% these are the right methods, but it would be something similar to them.
GroupLocalServiceUtil.getRoleGroups(long roleId)
Then with
UserLocalServiceUtil.getGroupUserIds(long groupId)
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™