new implementation of sitesMembership function; it controls user's visibility depending on groups belonging to and group-to-site visibility (instead of verifying common sites between logged in user and the ones being shown)