Resend Validation Email#590
Merged
Merged
Conversation
…end user validation email Based on the register method, allow for a new registration token to be created as well as resetting the token registration time based on the option for token_expiration in seconds. Add a test to check that when this method is called, the token expiration is changed.
For test to pass in php <= php 7.0, token_expiration must be a different value in the test environment for the end values to be different, because the test takes less than a second.
steinkel
reviewed
Aug 15, 2017
| */ | ||
| public function resendValidationEmail($user, $options) | ||
| { | ||
| $tokenExpiration = Hash::get($options, 'token_expiration'); |
Member
There was a problem hiding this comment.
I would check if the user is already active first, to prevent sending an activation emails to active users
ajibarra
approved these changes
Aug 18, 2017
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#454
Based on the register method, allow for a new registration token to be created as well as resetting the token registration time based on the option for
token_expirationin seconds.Add a test to check that when this method is called, the token expiration is changed.
EDIT:
The test was originally failing in PHP <= PHP 7.0 due to the
token_expirationbeing the same in seconds for the registration and the update. The test takes less than a second so the values were reading as the same time.