code: private IPersonAttributes postProcessPerson(IPersonAttributes person, String uidInQuery) {
  
          // Verify the person has a name
          final String name = person.getName();
          if (name == null) {
              logger.warn("IPerson '{}' has no name and therefore cannot be post-processed", person);
              return person;
          }
  
          // First apply specified overrides
          IPersonAttributes rslt =
                  applyOverridesIfPresent(person); // default -- won't normally need to do anything
  
          /*
           * And secondly there are two attributes in uPortal that cause havoc if they're missing:
           *
           *   - username
           *   - displayName
           *
           * We need to do our best to provide these if the external data sources don't cover it.
           */
          rslt = selectUsernameIfAbsent(rslt);
          rslt = selectDisplayNameIfAbsent(rslt);
  
          logger.debug(
                  "Post-processing of person with name='{}' produced the following person:  {}",
                  person.getName(),
                  rslt);
  
          return rslt;
      }
docs: Implements support for overriding attributes by administrator choice and for intelligently
  selecting (if possible) values for 'username' and 'displayName' if none have been provided by
  other data sources.
  
  @param person The user
  @param uidInQuery The username specified in the PersonDirectory query, if certain
  @return The user, possibly with modifications