Foren

Get a community to which the user group belongs to

B D, geändert vor 12 Jahren.

Get a community to which the user group belongs to

New Member Beiträge: 9 Beitrittsdatum: 29.12.11 Neueste Beiträge
Hi,

what is the correct way to programmatically (in the .java portlet code) get the community which the user group belongs to. I have fetched the user group which the logged in user is assigned to, and now i want to get the community for the fetched user group.

Thanks.
thumbnail
Hitoshi Ozawa, geändert vor 12 Jahren.

RE: Get a community to which the user group belongs to

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
There's no longer such a thing as a "community" in Liferay 6.1.0 so there's not "correct way" of getting it.
B D, geändert vor 12 Jahren.

RE: Get a community to which the user group belongs to

New Member Beiträge: 9 Beitrittsdatum: 29.12.11 Neueste Beiträge
Uhm, true, I wasn't accurate. I want to get the _site_ which the user group is a member of.
thumbnail
Hitoshi Ozawa, geändert vor 12 Jahren.

RE: Get a community to which the user group belongs to (Antwort)

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
May be this?

http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/GroupLocalServiceUtil.html

getUserGroupsRelatedGroups(List<UserGroup> userGroups)
Returns all the groups related to the user groups.
B D, geändert vor 12 Jahren.

RE: Get a community to which the user group belongs to

New Member Beiträge: 9 Beitrittsdatum: 29.12.11 Neueste Beiträge
Thanks, that did it! For some reason i skipped that method while trying to figure it out.