Controller/AccountsController.php
public function retrieveCurrentUser(CachePolicy $cachePolicy = null)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode([], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->get('v1/accounts/me', $parameters, $cachePolicy);
        $result = new User($result);

        return $result;
    }
public function retrieveCurrentUser(CachePolicy $cachePolicy = null)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode([], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->get('v1/accounts/me', $parameters, $cachePolicy);
        $result = new User($result);

        return $result;
    }
Fetches the currently logged in User.

Effectively a whoami call.


@param CachePolicy $cachePolicy a custom cache policy used for this request only

@return User