UserObject
in package
implements
JsonSerializable
uses
JsonSerializableTrait
Read onlyYes
Table of Contents
Interfaces
- JsonSerializable
Properties
- $email : string
- The user's email address.
- $firstName : string|null
- The user's first name.
- $id : string
- Your application's user identifier, which will be stored as an [`external_id`](https://workos.com/docs/authkit/metadata/external-identifiers). Used for upserting and deduplication.
- $lastName : string|null
- The user's last name.
- $metadata : array<string, string>|null
- A set of key-value pairs to attach to the user.
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
Properties
The user's email address.
public
string
$email
$firstName
The user's first name.
public
string|null
$firstName
= null
$id
Your application's user identifier, which will be stored as an [`external_id`](https://workos.com/docs/authkit/metadata/external-identifiers). Used for upserting and deduplication.
public
string
$id
$lastName
The user's last name.
public
string|null
$lastName
= null
$metadata
A set of key-value pairs to attach to the user.
public
array<string, string>|null
$metadata
= null
Methods
__construct()
public
__construct(string $id, string $email[, string|null $firstName = null ][, string|null $lastName = null ][, array<string|int, mixed>|null $metadata = null ]) : mixed
Parameters
- $id : string
- $email : string
- $firstName : string|null = null
- $lastName : string|null = null
- $metadata : array<string|int, mixed>|null = null
fromArray()
public
static fromArray(array<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
Return values
selfjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
public
toArray() : array<string|int, mixed>