Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
David Wainwright
Get groups for user
February 20, 2008 9:54 AM
Answer

David Wainwright

Rank: New Member

Posts: 23

Join Date: September 14, 2007

Recent Posts

newtech13 newtech13:
I'm trying to synchronize groups betwween LDAP and LR and I need a LR-API which retrieve the list of UserGroups to which a userid belongs. Something like GroupLocalServiceUtil.getMembers
Any suggestion ?


Brian Chan:
UserGroupLocalServiceUtil.getUserUserGroups(userId)


Hi Brian,

UserGroupLocalServiceUtil.getUserUserGroups(userId),

or for that matter,

LayoutLocalServiceUtil.getLayouts(userId),

always seem to return an empty list, which doesn't reflect the database content.

Just a bit of backgound. We need all the groups of which the user is a member and then all of the layouts for these groups in a standalone Portlet. We're using Liferay 4.4.1 together with JBoss-Tomcat 4.2.2.

Am I doing something wrong? Is there a better way to do this?

Thanks in advance,
David.
Michael Saechang
moved thread
February 20, 2008 9:55 AM
Answer

Michael Saechang

LIFERAY STAFF

Rank: Liferay Master

Posts: 577

Join Date: November 19, 2007

Recent Posts

please do not post in the legacy archive. instead please start a new threw and quote posts. thanks! emoticon

-mike
David Wainwright
RE: moved thread
February 21, 2008 12:33 AM
Answer

David Wainwright

Rank: New Member

Posts: 23

Join Date: September 14, 2007

Recent Posts

Sorry about that. Anyone have an idea how to retrieve all of the groups for a user (see post above)?

Thanks in advance,
David Wainwright
vikas suresh thakre
RE: moved thread
September 7, 2009 7:07 AM
Answer

vikas suresh thakre

Rank: Junior Member

Posts: 97

Join Date: May 18, 2009

Recent Posts

I also have the same requirment. I want to retrive all the user from the lDAP which belong to specific group.
David have you got the solution for this?
Amos Fong
RE: moved thread
September 9, 2009 1:56 PM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1953

Join Date: October 7, 2008

Recent Posts

To get a list of users that belong to a group (community), use

UserLocalServiceUtil.getGroupUsers

For usergroups, there should be something similar in userlocalserviceutil
vikas suresh thakre
RE: moved thread
September 10, 2009 3:00 AM
Answer

vikas suresh thakre

Rank: Junior Member

Posts: 97

Join Date: May 18, 2009

Recent Posts

Hi Amos,
I got the solution to my problem. actually i want a user import filter for importing the users form the LDAP directory.
only i have to fill the "user import filter" in LDAP UI setting.
Thanks for your reply