PasswordRecoveryService
in package
Table of Contents
Constants
- LIMIT_EMAIL_SEND_TIME = 10 * 60
- SETTING_TOKEN = 'passwordRecoveryToken'
- TOKEN_MAX_LIFE_TIME = 24 * 60 * 60
Properties
Methods
- __construct() : mixed
- checkToken() : bool
- Check the request token is valid for the User
- getSavedToken() : array<string|int, mixed>|null
- isLimited() : bool
- Check if email sending is limited with 10 minute pause
- reset() : bool
- Reset a password with checking a provided token
- sendRecoveryInfo() : bool
- Sends a message with recovery info by e-mail
Constants
LIMIT_EMAIL_SEND_TIME
public
mixed
LIMIT_EMAIL_SEND_TIME
= 10 * 60
SETTING_TOKEN
public
mixed
SETTING_TOKEN
= 'passwordRecoveryToken'
TOKEN_MAX_LIFE_TIME
public
mixed
TOKEN_MAX_LIFE_TIME
= 24 * 60 * 60
Properties
$user
public
User
$user
Methods
__construct()
public
__construct(User $user) : mixed
Parameters
- $user : User
checkToken()
Check the request token is valid for the User
public
checkToken(string|null $token) : bool
Parameters
- $token : string|null
Return values
boolgetSavedToken()
public
getSavedToken() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullisLimited()
Check if email sending is limited with 10 minute pause
public
isLimited() : bool
Return values
boolreset()
Reset a password with checking a provided token
public
reset(Password $password) : bool
Parameters
- $password : Password
Return values
boolsendRecoveryInfo()
Sends a message with recovery info by e-mail
public
sendRecoveryInfo() : bool