# The stateManager.getUsers() method
This documents the `stateManager.getUsers()` method.

This method has input parameters. The function could easily be defined as:
```ts
function getUsers(tournamentGuid: string): User[] | undefined {
    // backend logic
}
```
## General usage:
```ts
const users: User[] | undefined = taClient.stateManager.getUsers(tournamentGuid);
```

This method will return either an array of the `User` object or undefined. A `User` can be described by the following TypeScript Interface:
```ts
interface User {
    /**
     * @generated from protobuf field: string guid = 1;
     */
    guid: string;
    /**
     * @generated from protobuf field: string name = 2;
     */
    name: string;
    /**
     * @generated from protobuf field: string platform_id = 3;
     */
    platformId: string;
    /**
     * @generated from protobuf field: proto.models.User.ClientTypes client_type = 4;
     */
    clientType: User_ClientTypes;
    /**
     * @generated from protobuf field: string team_id = 5;
     */
    teamId: string;
    /**
     * @generated from protobuf field: proto.models.User.PlayStates play_state = 6;
     */
    playState: User_PlayStates;
    /**
     * @generated from protobuf field: proto.models.User.DownloadStates download_state = 7;
     */
    downloadState: User_DownloadStates;
    /**
     * @generated from protobuf field: repeated string mod_list = 8;
     */
    modList: string[];
    /**
     * @generated from protobuf field: proto.models.User.Point stream_screen_coordinates = 9;
     */
    streamScreenCoordinates?: User_Point;
    /**
     * @generated from protobuf field: int64 stream_delay_ms = 10;
     */
    streamDelayMs: bigint;
    /**
     * @generated from protobuf field: int64 stream_sync_start_ms = 11;
     */
    streamSyncStartMs: bigint;
    /**
     * @generated from protobuf field: proto.models.User.DiscordInfo discord_info = 12;
     */
    discordInfo?: User_DiscordInfo;
    /**
     * @generated from protobuf field: bytes user_image = 13;
     */
    userImage: Uint8Array;
    /**
     * @generated from protobuf field: proto.models.Permissions permissions = 14;
     */
    permissions: Permissions;
}
```

- For the definition of a User_ClientTypes please look at the [Enums -> User_ClientTypes page](/documentation#Enums/5-User_ClientTypes)
- For the definition of a User_PlayStates please look at the [Enums -> User_PlayStates page](/documentation#Enums/5-User_PlayStates)
- For the definition of a User_DownloadStates please look at the [Enums -> User_DownloadStates page](/documentation#Enums/5-User_DownloadStates)
- For the definition of a User_Point please look at the [Modals -> User_Point page](/documentation#Modals/4-User_Point)
- For the definition of a User_DiscordInfo please look at the [Modals -> User_DiscordInfo page](/documentation#Modals/4-User_DiscordInfo)
- For the definition of a Permissions please look at the [Enums -> Permissions page](/documentation#Enums/5-Permissions)

<div class="info-box">
    <span class="material-icons">info</span>
    <div>
        <strong>Example:</strong> A direct example is not available, as this function is not used in ShyyTAUI.
    </div>
</div>