3

I've amended the time people have to verify an account, using:

'verificationCodeDuration' => 'P7D',

But, I've done this retrospectively, after the verification emails have all gone out (quite a lot of them). Will this new verification time be applied to verification links that have already been sent out? Or will I need to get those emails sent again, as only new verification links will have this applied?

3

If you check UsersService->isVerificationCodeValidForUser(), you can see that it's taking the current date/time and subtracting the verificationCodeDuration config setting value, then comparing that to the verificationCodeIssuedDate time that is saved for that user in the craft_users table. If the issued date/time is greater than the result of the subtraction date/time, then it's still valid, otherwise, not.

So because it's checking at runtime against the current date/time, the new verificationCodeDuration value will immediately take affect for any existing verification codes on a user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.