Zitadel PHP API

Account
in package

Class for the general management of the user account e.g. Deactivating the account

Table of Contents

Properties

$action  : string
$settings  : array<string|int, mixed>
$userid  : int

Methods

__construct()  : mixed
Initialize the user account class
deactivate()  : void
Deactivate a user. He won't be able to log in. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.
lock()  : void
Lock a user. The user won't be able to log in.
reactivate()  : void
Reactivate a user. He will be able to log in again.
setUserId()  : void
Set the userid
unlock()  : void
Unlock a user. You'll get an error, if the user is not locked.
request()  : void
Send a POST request to perform an action on a user account (e.g., deactivate, reactivate, lock, unlock).

Properties

$settings

private array<string|int, mixed> $settings

Methods

__construct()

Initialize the user account class

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

array The settings array

deactivate()

Deactivate a user. He won't be able to log in. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.

public deactivate() : void

You'll get an error, if the user is already deactivated

Tags
throws
Exception

Returns an exception with an error code and a message if the communication with Zitadel fails

lock()

Lock a user. The user won't be able to log in.

public lock() : void

You'll get an error, if the user is not locked.

Tags
throws
Exception

Returns an exception with an error code and a message if the communication with Zitadel fails

reactivate()

Reactivate a user. He will be able to log in again.

public reactivate() : void

You'll get an error, if the user is not deactivated.

Tags
throws
Exception

Returns an exception with an error code and a message if the communication with Zitadel fails

setUserId()

Set the userid

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

int User id

unlock()

Unlock a user. You'll get an error, if the user is not locked.

public unlock() : void
Tags
throws
Exception

Returns an exception with an error code and a message if the communication with Zitadel fails

request()

Send a POST request to perform an action on a user account (e.g., deactivate, reactivate, lock, unlock).

private request() : void
Tags
throws
Exception

Throws an exception with an error code and a message if the communication with Zitadel fails.


        
On this page

Search results