> ## Documentation Index
> Fetch the complete documentation index at: https://docs.playtolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PlaytoliaSession

> Player profile access and management

Provides the current player's profile. Syncs automatically after login and after profile updates.

### Methods

| Method                           | Parameters       | Returns | Notes                 |
| -------------------------------- | ---------------- | ------- | --------------------- |
| `GetUser()`                      | —                | `User?` | Null if not logged in |
| `Refresh()`                      | —                | `void`  | Manual sync           |
| `UpdateUsername(username)`       | `string`         | `void`  | Fire-and-forget       |
| `UpdateDisplayName(displayName)` | `string`         | `void`  | Fire-and-forget       |
| `UpdatePassword(old, new)`       | `string, string` | `void`  | Fire-and-forget       |
| `AddListener(listener)`          | `Action`         | `void`  |                       |
| `RemoveListener(listener)`       | `Action`         | `void`  |                       |

### User

| Field         | Type     | Notes                   |
| ------------- | -------- | ----------------------- |
| `Uid`         | `string` | Platform-level user ID  |
| `PlayerId`    | `string` | Game-specific player ID |
| `Username`    | `string` |                         |
| `DisplayName` | `string` |                         |
| `Email`       | `string` |                         |
| `Avatar`      | `string` | URL                     |
| `Lang`        | `string` | Locale code (e.g. "en") |
| `Location`    | `string` |                         |
| `Timezone`    | `string` |                         |
| `CreatedAt`   | `string` | ISO timestamp           |
