/*
(non-Javadoc)

@see com.ibm.wsspi.sib.core.SICoreConnection#getResolvedUserid()
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;
    }
1132122
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getId");
      
    String id = aiStream.getStreamId().toString();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getId");
    return id;
  }
558614
protected UUID getLoggedUserId() {
    HttpServletRequest httpServletRequest = getHttpServletRequest();
    String remoteUser = httpServletRequest.getRemoteUser();
    if (remoteUser == null) {
      return null;
    }
    
    return UUID.fromString(remoteUser);
  }
188634
@Override
  @CheckForNull
  public String getId() {
    return config.get(CoreProperties.SERVER_ID).orElse(null);
  }
45019
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getId");
    String id = _sourceStream.getID();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getId", id);
    return id; 
  }
1021173
public int getUserID()
    {
        int iUserID = -1;
        String strUserID = DBConstants.BLANK;
        if (this.getRecord().getRecordOwner() != null)
            if (this.getRecord().getRecordOwner().getTask() != null)
                if (this.getRecord().getRecordOwner().getTask().getApplication() != null)
            strUserID = ((BaseApplication)this.getRecord().getRecordOwner().getTask().getApplication()).getUserID();
        try   {
            iUserID = Integer.parseInt(strUserID);
            if (iUserID == 0)
                iUserID = -1;
        } catch (NumberFormatException e) {
            iUserID = -1;
        }
        return iUserID;
    }
34067
public synchronized ID addOnline(final USER user, final ID sessionId)
	{
		sessionIdToUser.put(sessionId, user);
		return usersOnline.put(user, sessionId);
	}
821530
public String getUserName(CmsObject cms) {

        String userName = getUserId().toString();
        try {
            userName = cms.readUser(getUserId()).getName();
        } catch (CmsException e) {
            // ignore
        }
        return userName;
    }
853999
@JsonIgnore
	public String getUsername() {
		if (App.isRoot(user.getAppid())) {
			return user.getIdentifier();
		} else {
			return user.getAppid() + "/" + user.getIdentifier();
		}
	}
938121
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getId");

    String id = this.getUuid();
   //we need something unique - therefore cannot use 
   //just topic space ID
   id += this.getRemoteEngineUuid();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getId", id);
    return id;
  }
842175
def get_smt_userid():
    """"""
    cmd = ["sudo", "/sbin/vmcp", "query userid"]
    try:
        userid = subprocess.check_output(cmd,
                                         close_fds=True,
                                         stderr=subprocess.STDOUT)
        userid = bytes.decode(userid)
        userid = userid.split()[0]
        return userid
    except Exception as err:
        msg = ("Could not find the userid of the smt server: %s") % err
        raise exception.SDKInternalError(msg=msg)
661040
private PortalUser getPortalUser(final String userName) {
        return jdbcOperations.execute(
                (ConnectionCallback<PortalUser>)
                        con -> {
                            PortalUser portalUser = null;
                            PreparedStatement pstmt = null;

                            try {
                                String query = "SELECT USER_ID FROM UP_USER WHERE USER_NAME=?";

                                pstmt = con.prepareStatement(query);
                                pstmt.setString(1, userName);

                                ResultSet rs = null;
                                try {
                                    if (log.isDebugEnabled())
                                        log.debug(
                                                "RDBMUserIdentityStore::getPortalUID(userName="
                                                        + userName
                                                        + "): "
                                                        + query);
                                    rs = pstmt.executeQuery();
                                    if (rs.next()) {
                                        portalUser = new PortalUser();
                                        portalUser.setUserId(rs.getInt("USER_ID"));
                                        portalUser.setUserName(userName);
                                    }
                                } finally {
                                    try {
                                        if (rs != null) {
                                            rs.close();
                                        }
                                    } catch (Exception e) {
                                    }
                                }
                            } finally {
                                try {
                                    if (pstmt != null) {
                                        pstmt.close();
                                    }
                                } catch (Exception e) {
                                }
                            }

                            return portalUser;
                        });
    }
428673
protected User getUser(String username) {
    Integer id = userIds().get(username.toLowerCase());
    if (id == null) {
      throw new IllegalStateException(format("Could not find ID corresponding to username [%s]", username));
    }

    return getUser(id);
  }
1304773
@SuppressWarnings("unchecked")
    @Override
	public <T extends ApiUser> T getUserById(int id) {
	    User sfsUser = getZone().getUserById(id);
	    if(sfsUser != null && sfsUser.containsProperty(APIKey.USER))
	        return (T) sfsUser.getProperty(APIKey.USER);
	    return null;
	}
469898
public static Function<RequestEnvelope, String> userId() {
        return r -> Optional.ofNullable(r).map(RequestEnvelope::getContext)
                .map(Context::getSystem)
                .map(SystemState::getUser)
                .map(User::getUserId)
                .orElseThrow(() -> new PersistenceException("Could not retrieve user ID from request envelope to generate persistence ID"));
    }
409027
@Override
    public String getPortalUserName(final int uPortalUID) {
        final List<String> results =
                this.jdbcOperations.queryForList(
                        "SELECT USER_NAME FROM UP_USER WHERE USER_ID=?", String.class, uPortalUID);
        return DataAccessUtils.singleResult(results);
    }
970971
private UserRegistryService getUserRegistryService(String id) {
        UserRegistryService service = userRegistry.getService(id);
        if (service == null) {
            throwIllegalArgumentExceptionInvalidAttributeValue(SecurityConfiguration.CFG_KEY_USERREGISTRY_REF, id);
        }
        return service;
    }