Skip to content

Resend Validation Email#590

Merged
ajibarra merged 8 commits into
CakeDC:developfrom
stephenburgess8:develop
Aug 18, 2017
Merged

Resend Validation Email#590
ajibarra merged 8 commits into
CakeDC:developfrom
stephenburgess8:develop

Conversation

@stephenburgess8

@stephenburgess8 stephenburgess8 commented Aug 11, 2017

Copy link
Copy Markdown
Contributor

#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_expiration in 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_expiration being 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.

…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.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.1%) to 79.661% when pulling 087b046 on stephenburgess8:develop into 26032b0 on CakeDC:develop.

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.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.1%) to 79.661% when pulling 86897ed on stephenburgess8:develop into 26032b0 on CakeDC:develop.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.1%) to 79.661% when pulling 8031c9e on stephenburgess8:develop into 26032b0 on CakeDC:develop.

*/
public function resendValidationEmail($user, $options)
{
$tokenExpiration = Hash::get($options, 'token_expiration');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would check if the user is already active first, to prevent sending an activation emails to active users

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.09%) to 79.649% when pulling af7f4b8 on stephenburgess8:develop into 26032b0 on CakeDC:develop.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.2%) to 79.712% when pulling 6f46cdc on stephenburgess8:develop into 26032b0 on CakeDC:develop.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.2%) to 79.712% when pulling 6f46cdc on stephenburgess8:develop into 26032b0 on CakeDC:develop.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.2%) to 79.712% when pulling 6f46cdc on stephenburgess8:develop into 26032b0 on CakeDC:develop.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.2%) to 79.712% when pulling 2dab5ff on stephenburgess8:develop into 26032b0 on CakeDC:develop.

@ajibarra
ajibarra merged commit 00bd6c9 into CakeDC:develop Aug 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants