liferayliferay-6portletliferay-7liferay-7.1

How to get users associated with a team in Liferay


I Need to fetch Team associated with the group in Liferay.

Need Some Help

I do this thing but, from this, I got all the team which is created, I need a team which is associated with a specific group

long groupId = themeDisplay.getLayout().getGroupId();
List<Team> teamGroup=TeamLocalServiceUtil.getGroupTeams(groupId);

Solution

  • I Got Solution

    You can Fetch Team associated with the Group

        //you have to first find user group id than pass it simply
    
        TeamLocalServiceUtil.getUserGroupTeams(userGroupId));