code: @Override
      public int getPortalUID(IPerson person, boolean createPortalData)
              throws AuthorizationException {
          int uid;
          String username = (String) person.getAttribute(IPerson.USERNAME);
  
          // only synchronize a non-guest request.
          if (PersonFactory.getGuestUsernames().contains(username)) {
              uid = __getPortalUID(person, createPortalData);
          } else {
              synchronized (getLock(person)) {
                  uid = __getPortalUID(person, createPortalData);
              }
          }
          return uid;
      }
docs: Get the portal user ID for this person object.
  
  @param person The {@link IPerson} for whom a UID is requested
  @param createPortalData indicating whether to try to create all uPortal data for this user
  from template prototype
  @return uPortalUID number or -1 if unable to create user.
  @throws AuthorizationException if createPortalData is false and no user is found or if a sql
  error is encountered