# UserIdentityHero

> Typed view-model for the user-identity hero card: monogram, name, email, status pill, and id pill.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › [User](/docs/extensions/debug-core/reference/panel/user/index.md) › UserIdentityHero

| final readonly class | `PHPForge\Debug\Panel\User\UserIdentityHero` |
| --- | --- |
| Source | [`src/Panel/User/UserIdentityHero.php`](https://github.com/php-forge/debug-core/blob/main/src/Panel/User/UserIdentityHero.php#L10) |

Typed view-model for the user-identity hero card: monogram, name, email, status pill, and id pill.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-email"></span>`$email` readonly constructor | `string` | User email, or `''` when not present on the identity. | `UserIdentityHero` |
| [`$idValue`](#property-idValue) readonly constructor | `string` | Stringified user id, or `''` when not present on the identity. | `UserIdentityHero` |
| <span id="property-monogram"></span>`$monogram` readonly constructor | `string` | Uppercase one-letter monogram for the avatar (for example, `A` for `admin`), falling back to `?` when neither username nor email is available. | `UserIdentityHero` |
| <span id="property-statusLabel"></span>`$statusLabel` readonly constructor | `string` | Status display label (`Active`, `Banned`, `Inactive`, custom value, or `Unknown`), or `''` when the identity does not carry a status field. | `UserIdentityHero` |
| <span id="property-statusVariant"></span>`$statusVariant` readonly constructor | `string` | CSS variant token (`success` / `danger` / `muted`) controlling the status pill tint. | `UserIdentityHero` |
| <span id="property-username"></span>`$username` readonly constructor | `string` | Display username; falls back to `Unknown user` when the identity has no `username` or `name`. | `UserIdentityHero` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates the user-identity hero card data. | `UserIdentityHero` |

## Property details

### $idValue <span id="property-idValue"></span>

```php
public readonly string $idValue
```

Stringified user id, or `''` when not present on the identity.

Rendered next to the status pill as `ID #<value>`.

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct(string $username, string $email, string $idValue, string $monogram, string $statusLabel, string $statusVariant)
```

Creates the user-identity hero card data.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$username` | `string` |  |
| `$email` | `string` |  |
| `$idValue` | `string` |  |
| `$monogram` | `string` |  |
| `$statusLabel` | `string` |  |
| `$statusVariant` | `string` |  |