I set/get the User Group of a Liferay user. As an admin, I assigned a user to a user group. I've even check the user's profile to make sure it was assigned to him, and it was. Now in my portlet, I am able to get the user no problem, but the following method is saying that the user isn't assigned to a User Group...
1List<Group> groups = GroupLocalServiceUtil.getUserGroups(user.getUserId());
2System.out.println("Group count: "+groups.size());
Which prints out:
1Group count: 0
I'm not sure what I'm doing wrong...it may be the way I'm assigning the user to the group, or the way I'm retrieving the group. Any assistance would be greatly appreciated.
Por favor, faça login para denunciar.