메소드 |
설명 |
|
__construct ( Connection $db, UserRepo $users ) |
EmailConfirmationService constructor. |
|
createEmailConfirmation ( User $user ) : string |
Creates a new email confirmation in the database and returns the token. |
|
deleteConfirmationsByUser ( User $user ) : mixed |
Delete all email confirmations that belong to a user. |
|
getEmailConfirmationFromToken ( string $token ) : EmailConfirmation |
Gets an email confirmation by looking up the token,
Ensures the token has not expired. |
|
sendConfirmation ( User $user ) |
Create new confirmation for a user,
Also removes any existing old ones. |
|