|
Zitadel PHP Client 1.3.6
PHP Client for Zitadel
|
Public Member Functions | |
| __construct (array $settings) | |
| setUserId (string $userid) | |
| setUserName (string $username) | |
| setOrganization (int $orgId, string $orgDomain) | |
| setName (string $givenName, string $familyName) | |
| setNickName (string $nickName) | |
| setDisplayName (string $displayName) | |
| setLanguage (string $lang) | |
| setGender (string $gender) | |
| setEmail (string $email) | |
| setPhone (string $phone) | |
| addMetaData (string $key, string $value) | |
| setPassword (string $password, bool $changeRequired) | |
| addIDPLink (int $idpId, string $userId, string $userName) | |
| create () | |
Class to create a new user.
Definition at line 10 of file Create.php.
| __construct | ( | array | $settings | ) |
Initialize the user creation
| $settings | array The settings array |
Definition at line 36 of file Create.php.
| addIDPLink | ( | int | $idpId, |
| string | $userId, | ||
| string | $userName ) |
Add an Identity Provider to the User-Profile, so the user can sign in through e.g. Google or GitHub (optional). To get the required data to link an IDP, use the IDP class.
| $idpId | int The ID of the Identity Provider |
| $userId | string The user id you get from the Identity Provider |
| $userName | string The username you get from the Identity Provider |
Definition at line 167 of file Create.php.
| addMetaData | ( | string | $key, |
| string | $value ) |
Add Metadata to the user Profile (optional). The value will be automatically Base64 encoded.
| $key | string Key |
| $value | string Value |
Definition at line 143 of file Create.php.
| create | ( | ) |
Create the new user and sends the data to Zitadel
| Exception | Returns an exception with an error code and a message if the communication with Zitadel fails |
Definition at line 179 of file Create.php.
| setDisplayName | ( | string | $displayName | ) |
Set display name (optional)
| $displayName | string Display name |
Definition at line 94 of file Create.php.
| setEmail | ( | string | ) |
Set the Email address (required). The email address will automatically marked as verified.
| string Email address |
Definition at line 123 of file Create.php.
| setGender | ( | string | $gender | ) |
Set the gender of the new user (optional).
| $gender | string Default: GENDER_UNSPECIFIED, Possible values: GENDER_MALE, GENDER_FEMALE, GENDER_DIVERSE |
Definition at line 111 of file Create.php.
| setLanguage | ( | string | $lang | ) |
Set the preferred user language (optional). If you don't set one, the default language will be used.
| $lang | string Shortcode of the language, e.g. "en" or "de" |
Definition at line 103 of file Create.php.
| setName | ( | string | $givenName, |
| string | $familyName ) |
Set the full name of the new user (required)
| $givenName | string Given Name |
| $familyName | string Family Name |
Definition at line 75 of file Create.php.
| setNickName | ( | string | $nickName | ) |
Set the nickname (optional)
| $nickName | string Nickname |
Definition at line 85 of file Create.php.
| setOrganization | ( | int | $orgId, |
| string | $orgDomain ) |
Set the organization membership of the new user
| $orgId | int Organization-Id |
| $orgDomain | string Organization-Domain |
Definition at line 64 of file Create.php.
| setPassword | ( | string | $password, |
| bool | $changeRequired ) |
Set a password for the new user account (required)
| $password | string The password |
| $changeRequired | bool If a change is required, the user have to set a new password at the next login. |
Definition at line 156 of file Create.php.
| setPhone | ( | string | $phone | ) |
Set the phone number (optional). The phone number will be automatically marked as verified.
| $phone | string Phone number in the format with county code, e.g. "+491590123456" |
Definition at line 132 of file Create.php.
| setUserId | ( | string | $userid | ) |
Set the user id of the new user (optional). If not set, you'll get one from Zitadel.
| $userid | string The user id of the new user |
Definition at line 45 of file Create.php.
| setUserName | ( | string | $username | ) |
Set the username of the new user. If you don't set one, the email address will be used as username.
| $username | string The username of the new user |
Definition at line 54 of file Create.php.