Retrieves the user name as known to this database.

@return the database user name
@exception SQLException if a database access error occurs
515871
public String getUserName() throws SQLException {

        ResultSet rs = execute("CALL USER()");

        rs.next();

        String result = rs.getString(1);

        rs.close();

        return result;
    }
179318
@Override
  public Connection getConnection() throws SQLException {
    return getConnection(
      new Callable<Connection>() {
        @Override
        public Connection call() throws SQLException {
          return MonitoringDataSource.this.original.getConnection();
        }
      },
      ".getConnection");
  }
644898
public DatabaseInfo getDatabaseInfo(Connection connection) throws SQLException
    {
        PreparedStatement statement = connection.prepareStatement("select @@servername, db_name()");
        ResultSet results = null;
        DatabaseInfo info = null;

        try
        {
            results = statement.executeQuery();

            if (!results.next())
            {
                throw new SQLException("Query for database name and server name returned zero rows!");
            }

            info = new DatabaseInfo(results.getString(1), results.getString(2));
        }
        finally
        {
            closeResultSet(results, "Ignoring error whilst closing ResultSet that was used to query the DatabaseInfo");

            closeStatement(statement, "Ignoring error whilst closing PreparedStatement that was used to query the DatabaseInfo");
        }

        return info;
    }
885585
@SuppressWarnings("unchecked")
    public UserInfo getUserInfo(String username) throws Exception {

        String pwdCredential = getUserCredentials(username);

        if (pwdCredential == null) {
            return null;
        }

        pwdCredential = convertCredentialLdapToJetty(pwdCredential);
        pwdCredential = decodeBase64EncodedPwd(pwdCredential);
        Credential credential = Credential.getCredential(pwdCredential);
        List roles = getUserRoles(_rootContext, username);

        return new UserInfo(username, credential, roles);
    }
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);
  }
1337889
def _getUsername(self):
        
        for (l, d) in getAccountNames(self.store):
            return l + u'@' + d
853999
@JsonIgnore
	public String getUsername() {
		if (App.isRoot(user.getAppid())) {
			return user.getIdentifier();
		} else {
			return user.getAppid() + "/" + user.getIdentifier();
		}
	}
253286
private String getIdColumn() throws SQLException
   {
      try
      {
         return lockManagerEntry.getParameterValue(ISPNCacheableLockManagerImpl.INFINISPAN_JDBC_CL_ID_COLUMN_NAME);
      }
      catch (RepositoryConfigurationException e)
      {
         throw new SQLException(e);
      }
   }
821530
public String getUserName(CmsObject cms) {

        String userName = getUserId().toString();
        try {
            userName = cms.readUser(getUserId()).getName();
        } catch (CmsException e) {
            // ignore
        }
        return userName;
    }
731756
public String getStatement() throws SQLException {
		StringBuilder sb = new StringBuilder();
		appendSql(null, sb, new ArrayList<ArgumentHolder>());
		return sb.toString();
	}
1030901
public Connection getConnection() throws SQLException {
    try {
      if (urlParser == null) {
        initialize();
      }

      return MariaDbConnection.newConnection(urlParser, null);
    } catch (SQLException e) {
      throw ExceptionMapper.getException(e, null, null, false);
    }
  }
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);
    }
972950
public String determineUsername() {
		if (StringUtils.hasText(this.username)) {
			return this.username;
		}
		if (EmbeddedDatabaseConnection.isEmbedded(determineDriverClassName())) {
			return "sa";
		}
		return null;
	}
901632
public String getName() {
        if (name == null && securityIdentity != null) {
            name = securityIdentity.getPrincipal().getName();
        }

        return name;
    }
591537
public String determineUsername() {
		if (CollectionUtils.isEmpty(this.parsedAddresses)) {
			return this.username;
		}
		Address address = this.parsedAddresses.get(0);
		return (address.username != null) ? address.username : this.username;
	}
395864
protected String getToNames() {

        List<String> users = new ArrayList<String>();
        Iterator<String> itIds = idsList().iterator();
        while (itIds.hasNext()) {
            String id = itIds.next();
            CmsSessionInfo session = OpenCms.getSessionManager().getSessionInfo(id);
            if (session != null) {
                try {
                    String userName = getCms().readUser(session.getUserId()).getFullName();
                    if (!users.contains(userName)) {
                        users.add(userName);
                    }
                } catch (Exception e) {
                    LOG.error(e.getLocalizedMessage(), e);
                }
            }
        }
        StringBuffer result = new StringBuffer(256);
        Iterator<String> itUsers = users.iterator();
        while (itUsers.hasNext()) {
            result.append(itUsers.next());
            if (itUsers.hasNext()) {
                result.append("; ");
            }
        }
        return result.toString();
    }
618406
public Connection getConnection(String username, String password)
            throws SQLException {
        throw new SQLException(Resources.getMessage("NOT_SUPPORTED"));
    }