GenerateRecoveryCode
in package
Issue and persist a new recovery code for a user.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- execute() : string
- Generate, store, and return a new recovery code (plaintext, shown once).
Properties
$recoveryCodes
private
RecoveryCodeService
$recoveryCodes
$repository
private
UserRepositoryInterface
$repository
Methods
__construct()
public
__construct(UserRepositoryInterface $repository[, RecoveryCodeService|null $recoveryCodes = null ]) : mixed
Parameters
- $repository : UserRepositoryInterface
- $recoveryCodes : RecoveryCodeService|null = null
execute()
Generate, store, and return a new recovery code (plaintext, shown once).
public
execute(User $user) : string
Parameters
- $user : User
-
The user to issue a code for.
Return values
string —The plaintext recovery code to display to the user.