Get an array with user information.

@param string $username

@return Lastfm
767971
public function userInfo(string $username): Lastfm
    {
        $this->query = array_merge($this->query, [
            'method' => 'user.getInfo',
            'user' => $username,
        ]);

        $this->pluck = 'user';

        return $this;
    }
633053
public function getByUsername($username)
    {
        if (!is_string($username)) {
            return false;
        }

        $data = [
            'where' => [
                [
                    'column' => $this->tableAlias . '.username',
                    'value'  => $username,
                ],
            ],
        ];

        $user = $this->getAll(null, null, $data);

        return empty($user) ? false : $user[0];
    }
821937
public function listPublicUserReceiveEvents(string $username): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/users/:username/received_events/public', $username));
    }
254649
public function findUserByUsername($username)
    {
        $qb = $this->createQueryBuilder('user')
            ->where('user.username=:username');

        $query = $qb->getQuery();
        $query->setParameter('username', $username);

        return $query->getSingleResult();
    }
1012531
public function getByUsername($username)
    {
        $filter = new IteratorFilter();
        $filter->addRelation($this->getUserDefinition()->getUsername(), Relation::EQUAL, $username);
        return $this->getUser($filter);
    }
525892
public function forUser($username)
    {
        $options = [
            'username' => $username,
            'field_set_key' => 'detailed',
        ];

        $result = $this->get(UrlBuilder::RESOURCE_GET_BOARDS, $options);

        return $result ?: [];
    }
202443
public static function find($username)
    {
        $user = json_decode(self::get("/users/{$username}")->getBody(), true);
        
        return new self($user);
    }
1360994
public function lastByName($name) {
        for ($i = count($this->tokens) - 1; $i >= 0; $i--) {
            if ($this->tokens[$i]->getName() === $name) {
                return $this->tokens[$i];
            }
        }

        return null;
    }
356391
public function getRegistrations($username)
    {
        $params = [];
        $params['filter'] = $this->filter;
        $params['username'] = $username;
        $params['_return_fields+'] = 'fingerprint,extattrs';
        return $this->gateway->get('macfilteraddress', $params);
    }
409867
protected function getUserInfo($username)
    {
        if (!isset(self::$users[$username])) return null;
    
        $user = compact('username') + self::$users[$username];
        unset($user['password']);
        
        return $user;
    }
515027
public function getIdByUsername($username, array $params = [])
    {
        $arr = $this->listing(false, $params);
        if (!isset($arr[$username])) {
            return false;
        }

        return $arr[(string) $username];
    }
293270
public function removeUserAsCollaborator(string $username): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/collaborators/:username',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $username),
            Request::METHOD_DELETE);
    }
718949
public function get_userinfo($username) {
        $cached = $this->get_static_user_info();
        if (!empty($cached) && $cached['username'] == $username) {
            return $cached;
        }
        return false;
    }
119219
public function loadUserByUsername($username)
    {
        if (!isset($this->cachedUsers[$username])) {
            $this->cachedUsers[$username] = $this->userProvider->loadUserByUsername($username);
        }
        return $this->cachedUsers[$username];
    }
1263992
function getAccountInfoByUsername($username)
    {
        $response = $this->call( new Command\AccountInfo($username, Command\AccountInfo::TYPE_USERNAME) );
        if ( $ex = $response->hasException() )
            throw $ex;

        $r = $response->expected();
        $r = ($r instanceof iDataEntity) ? $r->get('result') : $r;
        return $r;
    }
180880
public function getSingleUser(string $username): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/users/:username', $username));
    }
1162425
protected function getUserByName(string $username)
    {
        $found_user = null;
        $users      = $this->getWordpressParameter('users');

        foreach ($users as $user) {
            if ($username === $user['username']) {
                $found_user = $user;
                break;
            }
        }

        if ($found_user === null) {
            throw new RuntimeException("[W801] User not found for name \"{$username}\"");
        }

        return $found_user;
    }