List of usage examples for com.liferay.portal.kernel.model User getMySiteGroups
public java.util.List<Group> getMySiteGroups() throws com.liferay.portal.kernel.exception.PortalException;
From source file:eu.gerhards.liferay.services.angular.service.impl.AngularUserServiceImpl.java
License:Open Source License
@Override public List<Group> getUserSites(long userId) throws PortalException { _log.info("Getting sites for user with id: " + String.valueOf(userId)); _log.debug(" ... security check ..."); PortalPermissionUtil.check(getPermissionChecker(), ActionKeys.VIEW); _log.debug(" ... getting information"); User user = UserLocalServiceUtil.getUser(userId); List<Group> groups = new ArrayList<>(); if (user != null) { groups = user.getMySiteGroups(); }// w ww . j a v a 2 s .co m return groups; }