code: private String getUserAccessId(String userName) {
  
          try {
              SecurityService securityService = securityServiceRef.getService();
              UserRegistryService userRegistryService = securityService.getUserRegistryService();
              UserRegistry userRegistry = userRegistryService.getUserRegistry();
              String realm = userRegistry.getRealm();
              String uniqueId = userRegistry.getUniqueUserId(userName);
              return AccessIdUtil.createAccessId(AccessIdUtil.TYPE_USER, realm, uniqueId);
          } catch (EntryNotFoundException e) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Caught exception getting the access id for "
                               + userName + ": " + e);
              }
          } catch (RegistryException e) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Caught exception getting the access id for "
                               + userName + ": " + e);
              }
          }
          return null;
      }
docs: Get the access id for a user by performing a looking up in the user registry.
  
  @param userName the user for which to create an access id
  @return the access id of the userName specified,
  otherwise null when a registry error occurs or the entry is not found