Zitadel PHP API

Get
in package

Returns the full user data including the profile, email, etc.

Table of Contents

Properties

$displayName  : string
$email  : string
$familyName  : string
$gender  : string
$givenName  : string
$isEmailVerified  : bool
$isPhoneVerified  : bool
$loginNames  : array<string|int, mixed>
$nickName  : string
$phone  : string
$preferredLanguage  : string
$preferredLoginName  : string
$profilePicture  : string
$rawUserData  : string
$settings  : array<string|int, mixed>
$userid  : int
$userName  : string
$userState  : string

Methods

__construct()  : mixed
Initialize the Get class
fetch()  : void
Fetch the user data from Zitadel
getDisplayName()  : string
Returns the display name
getEmail()  : string
Returns the email address
getFamilyName()  : string
Returns the family name
getGender()  : string
Returns the gender
getGivenName()  : string
Returns the given name
getLoginNames()  : array<string|int, mixed>
Returns an array with the possible login names
getNickname()  : string
Returns the nickname
getPhone()  : string
Returns the phone number. Notice: If the user didn't set a profile picture, you'll get an error when accessing this function.
getPreferredLanguage()  : string
Returns the preferred language
getPreferredLoginName()  : string
Returns the preferred Login name
getProfilePicture()  : string
Returns the Profile Picture URL. Notice: If the user didn't set a profile picture, you'll get an error when accessing this function.
getRawUserData()  : string
Returns the raw user data
getUserName()  : string
Returns the username
getUserState()  : string
Returns the User state.
isEmailVerified()  : bool
Returns true if the email is verified
isPhoneVerified()  : bool
Returns true if the phone number is verified
setUserId()  : void
Set the userid

Properties

$displayName

private string $displayName

$email

private string $email

$familyName

private string $familyName

$gender

private string $gender

$givenName

private string $givenName

$isEmailVerified

private bool $isEmailVerified

$isPhoneVerified

private bool $isPhoneVerified

$loginNames

private array<string|int, mixed> $loginNames

$nickName

private string $nickName

$phone

private string $phone

$preferredLanguage

private string $preferredLanguage

$preferredLoginName

private string $preferredLoginName

$profilePicture

private string $profilePicture

$rawUserData

private string $rawUserData

$settings

private array<string|int, mixed> $settings

$userid

private int $userid

$userName

private string $userName

$userState

private string $userState

Methods

__construct()

Initialize the Get class

public __construct(mixed $settings) : mixed
Parameters
$settings : mixed

array The settings array

fetch()

Fetch the user data from Zitadel

public fetch() : void
Tags
throws
Exception

Returns an exception, if the communication with Zitadel fails

getDisplayName()

Returns the display name

public getDisplayName() : string
Return values
string

Display name

getEmail()

Returns the email address

public getEmail() : string
Return values
string

Email address

getFamilyName()

Returns the family name

public getFamilyName() : string
Return values
string

Family Name

getGender()

Returns the gender

public getGender() : string
Return values
string

Gender. Possible values: GENDER_UNSPECIFIED, GENDER_MALE, GENDER_FEMALE, GENDER_DIVERSE

getGivenName()

Returns the given name

public getGivenName() : string
Return values
string

Given Name

getLoginNames()

Returns an array with the possible login names

public getLoginNames() : array<string|int, mixed>
Return values
array<string|int, mixed>

Possible login names

getNickname()

Returns the nickname

public getNickname() : string
Return values
string

Nickname

getPhone()

Returns the phone number. Notice: If the user didn't set a profile picture, you'll get an error when accessing this function.

public getPhone() : string
Return values
string

getPreferredLanguage()

Returns the preferred language

public getPreferredLanguage() : string
Return values
string

Preferred language

getPreferredLoginName()

Returns the preferred Login name

public getPreferredLoginName() : string
Return values
string

Preferred Login name

getProfilePicture()

Returns the Profile Picture URL. Notice: If the user didn't set a profile picture, you'll get an error when accessing this function.

public getProfilePicture() : string
Return values
string

Profile Picture URL

getRawUserData()

Returns the raw user data

public getRawUserData() : string
Return values
string

JSON-encoded raw user data

getUserName()

Returns the username

public getUserName() : string
Return values
string

Username

getUserState()

Returns the User state.

public getUserState() : string
Return values
string

User state. Possible values: USER_STATE_UNSPECIFIED, USER_STATE_ACTIVE, USER_STATE_INACTIVE, USER_STATE_DELETED, USER_STATE_LOCKED, USER_STATE_INITIAL

isEmailVerified()

Returns true if the email is verified

public isEmailVerified() : bool
Return values
bool

verification of the email address

isPhoneVerified()

Returns true if the phone number is verified

public isPhoneVerified() : bool
Return values
bool

verification of the phone number

setUserId()

Set the userid

public setUserId(mixed $userid) : void
Parameters
$userid : mixed

int User id


        
On this page

Search results