alamut wrote:
> Hi Firends,
>
> For the same need, with the session of the user, how could I have the group
> and groupId, knowing that User does not contain the method getGroup or
> getGroupId.
>
> Thank's...
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the
exoplatform@... mailing list.
> To unsubscribe: mailto:
exoplatform-unsubscribe@...
> For general help: mailto:
sympa@...?subject=help
> ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws>
Use GroupHandler like that,
String userId = portletRequest.getRemoteUser();
OrganizationService aOrgService = (OrganizationService)
PortalContainer.getInstance().getComponentInstanceOfType
(OrganizationService.class);
GroupHandler groupHandler = aOrgService.getGroupHandler()
Collection groupCol = groupHandler.findGroupsOfUser(userId);
for(Group g:groupCol) {
//To do something
}
Please check GroupHandler's API for more information
--
Best regard,
Hoa Pham - eXoplatform Viet Nam's team
Ha Noi - Viet Nam.
Email:
hoa.pham@...
YM: phamvuxuanhoa
Skype:phamvuxuanhoa
--
You receive this message as a subscriber of the
exoplatform@... mailing list.
To unsubscribe: mailto:
exoplatform-unsubscribe@...
For general help: mailto:
sympa@...?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws