Get username

If no "username" value has been set, this method will
set and return a default "username" value,
if any such value is available

@see getDefaultUsername()

@return string|null username or null if no username has been set
180020
public function getUsername() : ?string 
    {
        if ( ! $this->hasUsername()) {
            $this->setUsername($this->getDefaultUsername());
        }
        return $this->username;
    }
767850
public function getValue() : ?string 
    {
        if ( ! $this->hasValue()) {
            $this->setValue($this->getDefaultValue());
        }
        return $this->value;
    }
1323771
public function username()
    {
        if (($username = env('ADMIN_USERNAME', null)) != null) {
            return $username;
        }

        if (($username = git_user_name()) != null) {
            return $username;
        }

        return "Admin";
    }
152303
private function getUser($username)
    {
        if (!isset($this->users[strtolower($username)])) {
            $ex = new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username));
            $ex->setUsername($username);

            throw $ex;
        }

        return $this->users[strtolower($username)];
    }
271423
public function getValue()
    {
        if ( ! isset($this->input[$this->inputName])) {
            return null;
        }

        return $this->input[$this->inputName];
    }
1116223
public function get()
    {
        if ($this->owner->loaded()
            || isset($this->owner->data[$this->short_name])
        ) {
            return $this->owner->get($this->short_name);
        }

        return $this->defaultValue();
    }
1117099
public function getName()
	{
		$name = null;

		if ( isset($this->response['data']['attributes']['first_name']) )
		{
			$name = $this->response['data']['attributes']['first_name'] . ' ' . $this->response['data']['attributes']['last_name'];
		}

		return $name;
	}
552300
public function get_default(): ?string
  {
    if (
      ($id_opt = $this->from_path('default')) &&
      ($all = $this->pref->get_all($id_opt))
    ){
      $id = false;
      foreach ( $all as $a ){
        if ( !empty($a['id_user']) ){
          $id = $a['id_alias'];
          break;
        }
        else if ( !empty($a['id_group']) ){
          $id = $a['id_alias'];
          break;
        }
        else if ( !empty($a['public']) ){
          $id = $a['id_alias'];
          break;
        }
      }
      return $id;
    }
	return null;
  }
1073722
public function getName(){
		$result = null;
		if (isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {
			$result = $this->userInfo['first_name'] . ' ' . $this->userInfo['last_name'];
			}
		elseif (isset($this->userInfo['first_name']) && !isset($this->userInfo['last_name'])) {
			$result = $this->userInfo['first_name'];
			}
		elseif (!isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {
			$result = $this->userInfo['last_name'];
			}
		return $result;
		}
928707
public function getName()
    {
        if (!array_key_exists(self::NAME, $this->passwd)) {
            throw new \Exception('Could not get user name from passwd.');
        }
        return $this->passwd[self::NAME];
    }
1217537
public function getDefaultValue()
    {
        $default = $this->_default;

        if ($default && !$this->isScalar()) {
            $default = $default instanceof AnDomainAttributeInterface ? clone $default :
                        AnDomainAttribute::getInstance($this->_type);
        }

        return $default;
    }
569372
public function getDefaultDatabaseName()
    {
        if ($this->_defaultDatabaseName === null) {
            if (preg_match('/^mongodb:\\/\\/.+\\/([^?&]+)/s', $this->dsn, $matches)) {
                $this->_defaultDatabaseName = $matches[1];
            } else {
                throw new InvalidConfigException("Unable to determine default database name from dsn.");
            }
        }

        return $this->_defaultDatabaseName;
    }
484175
public function getName() {

		$name = $this->getFullName();

		if( empty( $name ) ) {

			$name	= $this->username;

			if( empty( $name ) ) {

				$name	= preg_split( '/@/', $this->email );
				$name	= $name[ 0 ];
			}
		}

		return $name;
	}
96799
public function getUser()
    {
        if ($this->_user === null) {
            $this->_user = User::findByUsernameOrEmail($this->username, false);
        }
        return $this->_user;
    }
46130
@Override
    public String getName() {
        final Object attributeValue = this.getAttributeValue(this.userNameAttribute);
        if (attributeValue == null) {
            return null;
        }

        return attributeValue.toString();
    }
1306890
public function getUsername() {
		if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_USERNAME])) {
			return $_SESSION[self::SESSION_FIELD_USERNAME];
		}
		else {
			return null;
		}
	}
125700
protected function getUserInfo(string $username)
    {
        if (!isset($this->users[$username])) {
            return null;
        }

        return $this->users[$username];
    }