Sets the username that should be used for the resulting message.
<br>This will override the default username of the webhook.

@param  username
The username to use for this message

@return The current WebhookMessageBuilder for chaining convenience
554157
public WebhookMessageBuilder setUsername(String username)
    {
        this.username = Helpers.isBlank(username) ? null : username;
        return this;
    }
696121
public void setUserName(String userName) {
        SystemAssert.requireArgument(userName != null && !userName.isEmpty(), "Username cannot be null or empty.");
        this.userName = userName;
    }
577703
public static String userName() {
        return fixNonWord(StringUtils.left(JDefaultName.firstName(), 1).toLowerCase() + JDefaultName.lastName().toLowerCase() + JDefaultNumber.randomNumberString(2));
    }
513396
public static void putPasswordResetUsername(final RequestContext requestContext, final String username) {
        val flowScope = requestContext.getFlowScope();
        flowScope.put("username", username);
    }
1025849
@NotNull
    @Deprecated
    @ObjectiveCName("requestStartAnonymousAuthWithUserName:")
    public Command<AuthState> requestStartAnonymousAuth(String userName) {
        return modules.getAuthModule().requestStartAnonymousAuth(userName);
    }
1363002
public R setName(String name) {
        mBodyMap.put(BoxUser.FIELD_NAME, name);
        return (R) this;
    }
169018
public function setUsername($username, $password = null) {
		$this->username = (string) $username;
		
		if ($password !== null) {
			$this->setPassword($password);
		}
		
		return $this;
	}
1317908
private void setUserGroupNames(String userName, String[] groupNames) {
    if (userName==null || userName.length()==0 ||
        groupNames== null || groupNames.length==0) {
      throw new IllegalArgumentException(
          "Parameters should not be null or an empty string/array");
    }
    for (int i=0; i<groupNames.length; i++) {
      if(groupNames[i] == null || groupNames[i].length() == 0) {
        throw new IllegalArgumentException("A null group name at index " + i);
      }
    }
    this.userName = userName;
    this.groupNames = groupNames;
  }
552473
public HttpClientBuilder basicAuth(String username, String password) {
		basicAuthUsername = username;
		basicAuthPassword = password;
		return this;
	}
1286282
@SuppressWarnings("unchecked")
    public ManagedUser getManagedUser(final String username) {
        final Query query = pm.newQuery(ManagedUser.class, "username == :username");
        final List<ManagedUser> result = (List<ManagedUser>) query.execute(username);
        return Collections.isEmpty(result) ? null : result.get(0);
    }
636298
public void setName(final String name) {
		this.name = name;
		setHumanName(JKMessage.get(name, true));
	}
226401
public void setUserName(String userName) {

        checkFrozen();
        m_userName = userName;
        setOuFqn(CmsOrganizationalUnit.getParentFqn(userName));
    }
268792
public function setToken($username = null)
    {
        // Only set Token if Username is supplied.
        if (! is_null($username)) {
            $this->token = new Token($username);
        }

        return $this;
    }
864534
public function setUsername($username)
        {
            if ($this->validateUsername($username) === false) {
                throw new Exception("Username \"$username\" is not a valid HTTP username");
            }

            $oldUsername     = $this->_username;
            $this->_username = $username;

            return $oldUsername;
        }
1187617
def a_send_username(username, ctx):
    """"""
    if username:
        ctx.ctrl.sendline(username)
        return True
    else:
        ctx.ctrl.disconnect()
        raise ConnectionAuthenticationError("Username not provided", ctx.ctrl.hostname)
20101
private String toDN(String username)
	{
		String userDN = new StringBuilder(userDnPrefix).append(username).append(this.userDnSuffix).toString();
		return userDN;
	}
162652
@Override
  public final String getUserName() {
    if (httpReq.getUserPrincipal() != null) {
      return httpReq.getUserPrincipal().getName();
    }
    return null;
  }