Foren

Method to tell if the logged in user is a member of a specific group

Craig Laidlaw, geändert vor 11 Jahren.

Method to tell if the logged in user is a member of a specific group

New Member Beiträge: 9 Beitrittsdatum: 21.11.10 Neueste Beiträge
Embarrassed to say I have been combing through forums and doc for two hours and can't find this...

I'm looking for a simple service level call I can make in VM to determine if the logged in user is a member of a specific user group.

I can get the userId and I can get the usergroupId but I can't find one simple boolean method to tell me if the userid is a member of usergroupid

I'm able to get a list of all user groups for the user (UserGroupLocalService.getUserUserGroups) but I'd rather not have to iterate through the mess in vm just to check membership.

Thanks in advance.

Craig
Paul Butenko, geändert vor 11 Jahren.

RE: Method to tell if the logged in user is a member of a specific group

Junior Member Beiträge: 38 Beitrittsdatum: 02.07.10 Neueste Beiträge
Hi,
Maybe this method can help:

UserLocalServiceUtil.hasUserGroupUser

BR,
Paul Butenko
Craig Laidlaw, geändert vor 11 Jahren.

SOLVED Method to tell if the logged in user is a member of a specific group

New Member Beiträge: 9 Beitrittsdatum: 21.11.10 Neueste Beiträge
Paul Butenko:
UserLocalServiceUtil.hasUserGroupUser


That is it. Thanks so much for the quick response Paul.

Craig