Email
in package
Class for changing and verifying an email address
Table of Contents
Properties
- $returnedVerificationCode : string
- $settings : array<string|int, mixed>
- $userid : int
Methods
- __construct() : mixed
- Initialize the email change
- changeEmail() : void
- Change the email address. After running this command, you can get the verification code via the command getVerificationCode().
- getVerificationCode() : string
- Returns the email verification code
- resendVerificationCode() : void
- Get a new Verification code
- setUserId() : void
- Set the userid
- verify() : bool
- Verifies an email address with a verification code
Properties
$returnedVerificationCode
private
string
$returnedVerificationCode
$settings
private
array<string|int, mixed>
$settings
$userid
private
int
$userid
Methods
__construct()
Initialize the email change
public
__construct(mixed $settings) : mixed
Parameters
- $settings : mixed
-
array The settings array
changeEmail()
Change the email address. After running this command, you can get the verification code via the command getVerificationCode().
public
changeEmail(mixed $email) : void
Parameters
- $email : mixed
-
string E-Mail address
Tags
getVerificationCode()
Returns the email verification code
public
getVerificationCode() : string
Return values
string —Verification code
resendVerificationCode()
Get a new Verification code
public
resendVerificationCode() : void
Tags
setUserId()
Set the userid
public
setUserId(mixed $userid) : void
Parameters
- $userid : mixed
-
int User id
verify()
Verifies an email address with a verification code
public
verify(mixed $verifyCode) : bool
Parameters
- $verifyCode : mixed
-
string Verification Code
Return values
bool —Is the verification code correct?