AXIAM PHP SDK

UserResponse
in package
implements JsonSerializable

FinalYes

Public-safe user representation (no password_hash, no mfa_secret).

Table of Contents

Interfaces

JsonSerializable

Properties

$createdAt  : string
$email  : string
$emailVerified  : bool
$failedLoginAttempts  : int
$id  : string
$isLocked  : bool
$lockedUntil  : string|null
$metadata  : mixed
$mfaEnabled  : bool
$status  : UserStatus
$tenantId  : string
$updatedAt  : string
$username  : string

Methods

__construct()  : mixed
Constructs a UserResponse.
fromArray()  : self
Rebuilds a UserResponse from one decoded JSON object.
jsonSerialize()  : array<string, mixed>
Renders this object for `json_encode()`.
toArray()  : array<string, mixed>
Renders this object back to its wire form.

Properties

$failedLoginAttempts read-only

public int $failedLoginAttempts

$lockedUntil read-only

public string|null $lockedUntil = null

Methods

__construct()

Constructs a UserResponse.

public __construct(string $createdAt, string $email, bool $emailVerified, int $failedLoginAttempts, string $id, bool $isLocked, mixed $metadata, bool $mfaEnabled, UserStatus $status, string $tenantId, string $updatedAt, string $username[, string|null $lockedUntil = null ]) : mixed
Parameters
$createdAt : string

the server's created_at field

$email : string

the server's email field

$emailVerified : bool

True when the user's email address has been verified (email_verified_at is set). Exposed for the admin UI / profile.

$failedLoginAttempts : int

Number of consecutive failed login attempts.

$id : string

the server's id field

$isLocked : bool

Whether the account is currently locked (locked_until is in the future).

$metadata : mixed

the server's metadata field

$mfaEnabled : bool

the server's mfa_enabled field

$status : UserStatus

the server's status field

$tenantId : string

the server's tenant_id field

$updatedAt : string

the server's updated_at field

$username : string

the server's username field

$lockedUntil : string|null = null

Timestamp until which the account is locked, if any. (optional)

fromArray()

Rebuilds a UserResponse from one decoded JSON object.

public static fromArray(array<string, mixed> $data) : self
Parameters
$data : array<string, mixed>

The raw wire object.

Return values
self

jsonSerialize()

Renders this object for `json_encode()`.

public jsonSerialize() : array<string, mixed>

Any Sensitive it carries stays WRAPPED here, so a log line or a json_encode($model) in application code prints [SENSITIVE]. The one place a secret is revealed is ManagementTransport, on the way to the wire and nowhere else (§27.5).

Return values
array<string, mixed>

toArray()

Renders this object back to its wire form.

public toArray() : array<string, mixed>

§27.4 rule 5: a null property is OMITTED, not emitted as null. On a sparse update those two say opposite things — "leave this alone" versus "set this to nothing" — and only omission means the first.

Return values
array<string, mixed>
On this page

Search results