/** * Get all the sites a user has access to. * * @return An array of site IDs. */ protected String[] getAllUsersSites() { List<Site> sites = siteService.getSites( org.sakaiproject.site.api.SiteService.SelectionType.ACCESS, null, null, null, null, null); List<String> siteIds = new ArrayList<String>(sites.size()); for (Site site : sites) { if (site != null && site.getId() != null) { siteIds.add(site.getId()); } } siteIds.add(siteService.getUserSiteId(currentUser)); return siteIds.toArray(new String[siteIds.size()]); }
public static java.lang.String getUserSiteId(java.lang.String param0) { org.sakaiproject.site.api.SiteService service = getInstance(); if (service == null) return null; return service.getUserSiteId(param0); }