Zitadel PHP Client 1.3.6 PHP Client for Zitadel

Loading...
Searching...
No Matches
Public Member Functions
Email Class Reference

## Public Member Functions
| __construct (array $settings)
| setUserId (int $userid)
| getVerificationCode ()
| changeEmail (string $email)
| resendVerificationCode ()
| verify (string $verifyCode)

## Detailed Description

Class for changing and verifying an email address

Definition at line 10 of file Email.php.

## Constructor & Destructor Documentation

## ◆ __construct()

__construct | ( | array | $settings | ) |

Initialize the email change

Parameters

  $settings | array The settings array

Definition at line 19 of file Email.php.

## Member Function Documentation

## ◆ changeEmail()

changeEmail | ( | string | $email | ) |

Change the email address. After running this command, you can get the verification code via the command getVerificationCode().

Parameters

  $email | string E-Mail address

Returns
  void

Exceptions

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

Definition at line 44 of file Email.php.

## ◆ getVerificationCode()

getVerificationCode | ( |  | ) |

Returns the email verification code

Returns
  string Verification code

Definition at line 34 of file Email.php.

## ◆ resendVerificationCode()

resendVerificationCode | ( |  | ) |

Get a new Verification code

Returns
  void

Exceptions

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

Definition at line 80 of file Email.php.

## ◆ setUserId()

setUserId | ( | int | $userid | ) |

Set the userid

Parameters

  $userid | int User id

Returns
  void

Definition at line 27 of file Email.php.

## ◆ verify()

verify | ( | string | $verifyCode | ) |

Verifies an email address with a verification code

Parameters

  $verifyCode | string Verification Code

Returns
  bool Is the verification code correct?

Definition at line 114 of file Email.php.

The documentation for this class was generated from the following file:

- src/User/Email.php