Returns globus ID associated with the
specified local user name.

@param userID local user name
@return associated globus ID, null
if there is not any.
17988
public String getGlobusID(String userID) {
        if (userID == null) {
            throw new IllegalArgumentException(i18n.getMessage("userIdNull"));
        }

        if (this.map == null) {
            return null;
        }

        Iterator iter = this.map.entrySet().iterator();
        Map.Entry mapEntry;
        GridMapEntry entry;
        while(iter.hasNext()) {
            mapEntry = (Map.Entry)iter.next();
            entry = (GridMapEntry)mapEntry.getValue();
            if (entry.containsUserID(userID)) {
                return entry.getGlobusID();
            }
        }
        return null;
    }
1070232
def get_username(self, userid):
        '''
        '''

        username = self.user_map.get(userid)
        if not username:
            users = self.get_users()
            if users:
                members = {
                    m['id']: m['name']
                    for m in users.get('members', [{}])
                    if m.get('id')
                    and m.get('name')
                }
                if members:
                    self.user_map.update(members)

                username = self.user_map.get(userid, userid)

        return username
670671
public User withId(final long id) {
      return new User(id, username, displayName, slug, email, createTimestamp, url, metadata);
   }
517118
@Override
    public Integer getPortalUserId(String userName) {
        final List<Integer> results =
                this.jdbcOperations.queryForList(
                        "SELECT USER_ID FROM UP_USER WHERE USER_NAME=?", Integer.class, userName);
        return DataAccessUtils.singleResult(results);
    }
180583
public User getInfo(String userId) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_INFO);

        parameters.put("user_id", userId);

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        Element userElement = response.getPayload();
        User user = new User();
        user.setId(userElement.getAttribute("nsid"));
        user.setAdmin("1".equals(userElement.getAttribute("isadmin")));
        user.setPro("1".equals(userElement.getAttribute("ispro")));
        user.setIconFarm(userElement.getAttribute("iconfarm"));
        user.setIconServer(userElement.getAttribute("iconserver"));
        user.setRevContact("1".equals(userElement.getAttribute("revcontact")));
        user.setRevFriend("1".equals(userElement.getAttribute("revfriend")));
        user.setRevFamily("1".equals(userElement.getAttribute("revfamily")));
        String lPathAlias = userElement.getAttribute("path_alias");
        user.setPathAlias(lPathAlias == null || "".equals(lPathAlias) ? null : lPathAlias);
        user.setUsername(XMLUtilities.getChildValue(userElement, "username"));
        user.setDescription(XMLUtilities.getChildValue(userElement, "description"));
        user.setGender(XMLUtilities.getChildValue(userElement, "gender"));
        user.setIgnored("1".equals(XMLUtilities.getChildValue(userElement, "ignored")));
        user.setContact("1".equals(XMLUtilities.getChildValue(userElement, "contact")));
        user.setFriend("1".equals(XMLUtilities.getChildValue(userElement, "friend")));
        user.setFamily("1".equals(XMLUtilities.getChildValue(userElement, "family")));
        user.setRealName(XMLUtilities.getChildValue(userElement, "realname"));
        user.setLocation(XMLUtilities.getChildValue(userElement, "location"));
        user.setMbox_sha1sum(XMLUtilities.getChildValue(userElement, "mbox_sha1sum"));
        user.setPhotosurl(XMLUtilities.getChildValue(userElement, "photosurl"));
        user.setProfileurl(XMLUtilities.getChildValue(userElement, "profileurl"));
        user.setMobileurl(XMLUtilities.getChildValue(userElement, "mobileurl"));

        Element photosElement = XMLUtilities.getChild(userElement, "photos");
        user.setPhotosFirstDate(XMLUtilities.getChildValue(photosElement, "firstdate"));
        user.setPhotosFirstDateTaken(XMLUtilities.getChildValue(photosElement, "firstdatetaken"));
        user.setPhotosCount(XMLUtilities.getChildValue(photosElement, "count"));

        NodeList tzNodes = userElement.getElementsByTagName("timezone");
        for (int i = 0; i < tzNodes.getLength(); i++) {
            Element tzElement = (Element) tzNodes.item(i);
            TimeZone tz = new TimeZone();
            user.setTimeZone(tz);
            tz.setLabel(tzElement.getAttribute("label"));
            tz.setTimeZoneId(tzElement.getAttribute("timezone_id"));
            tz.setOffset(tzElement.getAttribute("offset"));
        }

        return user;
    }
901677
public String addId(final URI id) {
        if (id == null) {
            return null;
        }
        final URI localId = id.normalize();
        index ++;
        final String newId = PREFIX + Integer.toString(index);
        idMap.put(localId, newId);
        return newId;
    }
897847
public Request<UserBlocks> get(String userId) {
        Asserts.assertNotNull(userId, "user id");

        String url = baseUrl
                .newBuilder()
                .addPathSegments("api/v2/user-blocks")
                .addPathSegment(userId)
                .build()
                .toString();
        CustomRequest<UserBlocks> request = new CustomRequest<>(client, url, "GET", new TypeReference<UserBlocks>() {
        });
        request.addHeader("Authorization", "Bearer " + apiToken);
        return request;
    }
1276842
protected function getUserId($iUserId = null)
    {
        if (!empty($iUserId)) {
            $iUid = (int) $iUserId;
        } elseif ($this->activeUser('id')) {
            $iUid = $this->activeUser('id');
        } else {
            $this->setError('No user ID set');
            return false;
        }

        return $iUid;
    }
552812
@Override
    public String getResolvedUserid()
                    throws SIConnectionUnavailableException, SIConnectionDroppedException,
                    SIErrorException
    {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.entry(CoreSPIConnection.tc, "getResolvedUserid", this);

        // See if this connection has been closed
        checkNotClosed();

        String userName = null;
        try {
            if (_subject != null)
                userName = runtimeSecurityService.getUniqueUserName(_subject);
        } catch (MessagingSecurityException mse) {
            // No FFDC Needed here, just log an exception
            if (CoreSPIConnection.tc.isDebugEnabled())
                SibTr.exception(tc, mse);
        }

        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConnection.tc, "getResolvedUserid", userName);

        return userName;
    }
1346371
public User getUser(String userName) {
        User result = null;
        for (User item : getUsersList()) {
            if (item.getName().equals(userName)) {
                result = item;
            }
        }
        return result;
    }
991323
public User findUserByKeycloakId(UUID userId) {
    AuthSource authSource = authSourceDAO.findByStrategy(KEYCLOAK_AUTH_SOURCE);
    if (authSource == null) {
      logger.error("Could not find Keycloak auth source");
    }
    
    UserIdentification userIdentification = userIdentificationDAO.findByExternalId(userId.toString(), authSource);
    if (userIdentification != null) {
      return userIdentification.getUser();
    }
    
    return null;
  }
750178
function cleanUserId (userId) {
  if (userId && userId.userId) {
    return cleanUserId(userId.userId)
  }

  return (typeof userId === 'string') ? userId : null
}
926212
def _get_user_id_from_name(self, context_id, user_name):
        """"""
        users = self.zap.users.users_list(context_id)
        for user in users:
            if user['name'] == user_name:
                return user['id']

        raise ZAPError('No user with the name "{0}"" was found for context {1}'.format(user_name, context_id))
125043
public void setLocalID(String userID) {
    try {
      this.localID = URLEncoder.encode(userID, "UTF-8");
    } catch (UnsupportedEncodingException e) {
      logger.error("UnsupportedEncodingException " + e.getMessage(), e);
      e.printStackTrace();
      throw new RuntimeException(e);
    } ;
  }
541696
protected int getUserIdSendError(String username, MessageContext ctx) {
    try {
      return getUser(username).getId();
    } catch (IllegalStateException ex) {
      silent.send(getLocalizedMessage(USER_NOT_FOUND, ctx.user().getLanguageCode(), username), ctx.chatId());
      throw propagate(ex);
    }
  }
162741
public String getGroupId() {
        List<String> groups = USERS_GROUPS.get(_userId);
        return (groups != null && groups.size() > 0) ? groups.get(0) : null;
    }
840817
public HashIntMap<User> loadUsersFromId (int[] userIds)
        throws PersistenceException
    {
        HashIntMap<User> data = new HashIntMap<User>();
        if (userIds.length > 0) {
            String query = "where userId in (" + genIdString(userIds) + ")";
            for (User user : loadAll(_utable, query)) {
                user.setDirtyMask(_utable.getFieldMask());
                data.put(user.userId, user);
            }
        }
        return data;
    }