code: protected Map<String, String> getUserInfo(
              String remoteUser, HttpServletRequest httpServletRequest, IPortletWindow portletWindow)
              throws PortletContainerException {
          // Get the list of user attributes the portal knows about the user
          final IPersonAttributes personAttributes = this.personAttributeDao.getPerson(remoteUser);
          if (personAttributes == null) {
              return Collections.emptyMap();
          }
          final List<? extends UserAttribute> expectedUserAttributes =
                  this.getExpectedUserAttributes(httpServletRequest, portletWindow);
  
          final Map<String, String> portletUserAttributes =
                  this.generateUserInfo(personAttributes, expectedUserAttributes, httpServletRequest);
          return portletUserAttributes;
      }
docs: Commons logic to get a subset of the user's attributes for the specified portlet window.
  
  @param remoteUser The user to get attributes for.
  @param httpServletRequest The current, underlying httpServletRequest
  @param portletWindow The window to filter attributes for
  @return A Map of user attributes for the user and windows
  @throws PortletContainerException