Zitadel PHP Client 1.3.6 Help

Edit a user

Here you will learn, how to edit a user.
To change the email address, the phone number or the Password. You can find out how to change the email address, password or phone number on the corresponding pages in the documentation.

Introduction

To edit a user, you have to provide the full name and the user ID:

use ZitadelPhpClient\User\Edit; $edit_user = new Edit($settings); $edit_user->setUserId("12345678"); $edit_user->setName("John", "Doe"); // Put the edit functions here try { $edit_user->edit(); } catch (Exception $e) { echo $e->getMessage(); }

Change Nickname/Display name

To change the nickname or display name, you can use this commands:

$edit_user->setNickName("NickName"); $edit_user->setDisplayName("Admin");

Change username

To change the username, you can use this command:

$edit_user->setUserName("SampleUser");

Change language

You can change the language of the user with a shortcode.

$edit_user->setLanguage("en");

Change gender

You can change the gender of the user.

$edit_user->setGender("GENDER_FEMALE");

You have the following options: GENDER_MALE, GENDER_FEMALE, GENDER_DIVERSE and GENDER_UMSPECIFIED.

Last modified: 27 March 2024