Zitadel PHP API

Avatar
in package

Class to handle the avatar of a user

Table of Contents

Properties

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

Methods

__construct()  : mixed
Initialize the Email OTP setup
add()  : void
Add the avatar to the user. Needs the userToken
remove()  : void
Remove the user's avatar.
setImagePath()  : void
Set the image for the avatar
setUserId()  : void
Set the userid

Properties

$boundary

private string $boundary

$postData

private string $postData

$settings

private array<string|int, mixed> $settings

Methods

__construct()

Initialize the Email OTP setup

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

array The settings array

add()

Add the avatar to the user. Needs the userToken

public add() : void
Tags
throws
Exception

If there's an error

remove()

Remove the user's avatar.

public remove() : void
Tags
throws
Exception

If an error occurs during the request to remove the avatar from the server.

setImagePath()

Set the image for the avatar

public setImagePath(string $avatar) : void
Parameters
$avatar : string

Path to the image file

Tags
throws
Exception

if the image file can't be read

setUserId()

Set the userid

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

int User id


        
On this page

Search results