CreateUserOrganizationMembership
in package
implements
JsonSerializable
uses
JsonSerializableTrait
Read onlyYes
Table of Contents
Interfaces
- JsonSerializable
Properties
- $organizationId : string
- The ID of the [organization](https://workos.com/docs/reference/organization) which the user belongs to.
- $roleSlug : string|null
- A single role identifier. Defaults to `member` or the explicit default role. Mutually exclusive with `role_slugs`.
- $roleSlugs : array<string|int, string>|null
- An array of role identifiers. Limited to one role when Multiple Roles is disabled. Mutually exclusive with `role_slug`.
- $userId : string
- The ID of the [user](https://workos.com/docs/reference/authkit/user).
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
Properties
$organizationId
The ID of the [organization](https://workos.com/docs/reference/organization) which the user belongs to.
public
string
$organizationId
$roleSlug
A single role identifier. Defaults to `member` or the explicit default role. Mutually exclusive with `role_slugs`.
public
string|null
$roleSlug
= null
$roleSlugs
An array of role identifiers. Limited to one role when Multiple Roles is disabled. Mutually exclusive with `role_slug`.
public
array<string|int, string>|null
$roleSlugs
= null
$userId
The ID of the [user](https://workos.com/docs/reference/authkit/user).
public
string
$userId
Methods
__construct()
public
__construct(string $userId, string $organizationId[, string|null $roleSlug = null ][, array<string|int, mixed>|null $roleSlugs = null ]) : mixed
Parameters
- $userId : string
- $organizationId : string
- $roleSlug : string|null = null
- $roleSlugs : 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>