Documentation

SendVerificationEmail

Use case for sending an email verification link.

Generates a secure token, stores it hashed in the database, and sends the verification link via email. When email is disabled, auto-verifies the user and logs the token.

Tags
since
3.0.0

Table of Contents

Constants

TOKEN_EXPIRY_HOURS  = 24

Properties

$emailService  : EmailService
$repository  : UserRepositoryInterface
$tokenHasher  : TokenHasher

Methods

__construct()  : mixed
execute()  : bool
Send a verification email to the given user.

Constants

Properties

Methods

execute()

Send a verification email to the given user.

public execute(User $user) : bool

If email is disabled, the user is auto-verified.

Parameters
$user : User

The user to verify

Return values
bool

True if sent or auto-verified


        
On this page

Search results