VerifyEmail
in package
Use case for verifying a user's email address via token.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- execute() : User|null
- Verify email using the provided plaintext token.
Properties
$repository
private
UserRepositoryInterface
$repository
$tokenHasher
private
TokenHasher
$tokenHasher
Methods
__construct()
public
__construct(UserRepositoryInterface $repository, TokenHasher $tokenHasher) : mixed
Parameters
- $repository : UserRepositoryInterface
- $tokenHasher : TokenHasher
execute()
Verify email using the provided plaintext token.
public
execute(string $plaintextToken) : User|null
Parameters
- $plaintextToken : string
-
The token from the verification URL
Return values
User|null —The verified user, or null if token is invalid/expired