Zitadel PHP Client 1.3.6 PHP Client for Zitadel

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

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

## Detailed Description

Class for changing and verifying a phone number

Definition at line 10 of file Phone.php.

## Constructor & Destructor Documentation

## ◆ __construct()

__construct | ( | array | $settings | ) |

Initialize the phone number change

Parameters

  $settings | array The settings array

Definition at line 18 of file Phone.php.

## Member Function Documentation

## ◆ changePhone()

changePhone | ( | string | $phone | ) |

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

Parameters

  $phone | string Phone number

Returns
  void

Exceptions

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

Definition at line 43 of file Phone.php.

## ◆ getVerificationCode()

getVerificationCode | ( |  | ) |

Returns the phone number verification code

Returns
  string Verification code

Definition at line 33 of file Phone.php.

## ◆ resendVerificationCode()

resendVerificationCode | ( |  | ) |

Get a new Verification code. After running this command, you can get the verification code via the command getVerificationCode().

Returns
  void

Definition at line 78 of file Phone.php.

## ◆ setUserId()

setUserId | ( | int | $userid | ) |

Set the userid

Parameters

  $userid | int User id

Returns
  void

Definition at line 26 of file Phone.php.

## ◆ verify()

verify | ( | string | $verifyCode | ) |

Verifies a phone number with a verification code

Parameters

  $verifyCode | string Verification Code

Returns
  bool Is the verification code correct?

Definition at line 108 of file Phone.php.

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

- src/User/Phone.php