Checks if a given user name is the name of the guest user.<p>

@param userName the user name to check

@return <code>true</code> if a given user name is the name of the guest user
540443
public boolean isUserGuest(String userName) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(userName)) {
            return false;
        }
        return m_userGuest.equals(userName);
    }
776285
public function validateUsername($username)
    {
        $person = $this->getService('repos:people.person')->find(array('username' => $username));

        if ($person) {
            $this->setMessage('Username is already in use');
            return false;
        }

        return true;
    }
1265110
static boolean isValidSimpleName(String name) {
    return TokenStream.isJSIdentifier(name)
        && !TokenStream.isKeyword(name)
        // no Unicode escaped characters - some browsers are less tolerant
        // of Unicode characters that might be valid according to the
        // language spec.
        // Note that by this point, Unicode escapes have been converted
        // to UTF-16 characters, so we're only searching for character
        // values, not escapes.
        && isLatin(name);
  }
1054273
public boolean hasUser(String userId) {
        String normalized = normalizerUserName(userId);
        return loginToUser.containsKey(normalized) || emailToUser.containsKey(normalized);
    }
576082
@Programmatic
    public ApplicationUser findByUsernameCached(final String username) {
        return queryResultsCache.execute(new Callable<ApplicationUser>() {
            @Override public ApplicationUser call() throws Exception {
                return findByUsername(username);
            }
        }, ApplicationUserRepository.class, "findByUsernameCached", username);
    }
277027
public static boolean isSuperuser(String username)
    {
        UntypedResultSet result = selectUser(username);
        return !result.isEmpty() && result.one().getBoolean("super");
    }
580506
def is_username_valid(username):
    
    pattern = re.compile(r"^[a-zA-Z0-9_.-]+$")
    return bool(pattern.match(username))
212352
@Ensures("result == isQualifiedName(name.replace('/', '.'))")
  public static boolean isBinaryName(String name) {
    if (name == null || name.isEmpty()) {
      return false;
    }
    String[] parts = name.split("/");
    for (String part : parts) {
      if (!isSimpleName(part)) {
        return false;
      }
    }
    return true;
  }
913651
public static boolean isValidFieldName(String fieldName) {
        return fieldName != null &&
               fieldName.length() > 0 &&
               Utils.isLetter(fieldName.charAt(0)) &&
               Utils.allAlphaNumUnderscore(fieldName);
    }
905623
def user_is_superadmin(self, username=None):
        
        if username is None:
            username = self.session_username()

        return username in self._superadmins
5645
public boolean haveMember(String memberName) {
		return members.stream().anyMatch((member) -> (member.getName().equals(memberName)));
	}
725760
public DUser findByUsername(java.lang.String username) {
    return queryUniqueByField(null, DUserMapper.Field.USERNAME.getFieldName(), username);
  }
951695
public static boolean isValidNCName(String ncName) {
    final int length = ncName.length();
    if (length == 0) {
      return false;
    }
    char ch = ncName.charAt(0);
    if (!isNCNameStart(ch)) {
      return false;
    }
    for (int i = 1; i < length; ++i) {
      ch = ncName.charAt(i);
      if (!isNCName(ch)) {
        return false;
      }
    }
    return true;
  }
319922
@Override
    public boolean userPropertyExists(String name) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "userPropertyExists", name);

        boolean result = false;

        /* If the name is null there is nothing to do. so only proceed if it is */
        /* supplied. */
        if (name != null) {

            /* Got to check Maelstrom's transportVersion first as performance for it */
            /* is critical. */
            if (name.equals(MfpConstants.PRP_TRANSVER) && isTransportVersionSet()) {
                result = true;
            }
            /* otherwise, first try the JMS user property map as the most likely */
            else if ((mayHaveJmsUserProperties()) && (getJmsUserPropertyMap().containsKey(name))) {
                result = true;
            }
            /* then try the non-JMS user property map */
            else if ((mayHaveOtherUserProperties()) && (getOtherUserPropertyMap().containsKey(name))) {
                result = true;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "userPropertyExists", result);
        return result;
    }
118131
public boolean isCredentialsValid(String username, String password) {
        try {
            String token = getTokenAuthenticationManager().login(StringUtil.toEmptyIfNull(username), StringUtil.toEmptyIfNull(password));
            getTokenAuthenticationManager().logout(token);

            return true;
        } catch (Exception ex) {
            return false;
        }
    }
542816
public boolean nameExists(final String name) {
        boolean rslt = false; // default
        try {
            final ITenant tenant = this.tenantDao.getTenantByName(name);
            rslt = tenant != null;
        } catch (IllegalArgumentException iae) {
            // This exception is completely fine;  it simply
            // means there is no tenant with this name.
            rslt = false;
        }
        return rslt;
    }
107670
def check_username_uniqueness(self, username):
        
        log.info("[+] Checking for Uniqueness of username '{}'".format(username))
        return self._send_xmpp_element(sign_up.CheckUsernameUniquenessRequest(username))