Answers.Body: <p>If you check <a href="https://craftcms.com/classreference/services/UsersService#isVerificationCodeValidForUser-detail" rel="nofollow">UsersService->isVerificationCodeValidForUser()</a>, you <a href="https://github.com/pixelandtonic/Craft-Release/blob/master/app/services/UsersService.php#L155" rel="nofollow">can see</a> that it's taking the current date/time and subtracting the <a href="https://craftcms.com/docs/config-settings#verificationCodeDuration" rel="nofollow">verificationCodeDuration</a> config setting value, then comparing that to the <code>verificationCodeIssuedDate</code> time that is saved for that user in the <code>craft_users</code> table.  If the issued date/time is greater than the result of the subtraction date/time, then it's still valid, otherwise, not.</p>
  
  <p>So because it's checking at runtime against the current date/time, the new <code>verificationCodeDuration</code> value will immediately take affect for any existing verification codes on a user.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-14T17:40:54.010Z
Answers.LastActivityDate: 2016-07-14T17:40:54.010Z
Answers.UserDisplayName: Brad Bell
Body: <p>I've amended the time people have to verify an account, using:</p>
  
  <pre><code>'verificationCodeDuration' =&gt; 'P7D',
  </code></pre>
  
  <p>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?</p>
  
Tags: <users><config><verification>
Title: Will a change to verificationCodeDuration be updated retrospectively?
ThreadText: # Will a change to verificationCodeDuration be updated retrospectively?
  
  (Asked by: username_0 on 2016-07-14)
  
  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?
  
  **Tags:** users, config, verification
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-14. Score: 3 | Accepted answer
  
  If you check [UsersService->isVerificationCodeValidForUser()](https://craftcms.com/classreference/services/UsersService#isVerificationCodeValidForUser-detail), you [can see](https://github.com/pixelandtonic/Craft-Release/blob/master/app/services/UsersService.php#L155) that it's taking the current date/time and subtracting the [verificationCodeDuration](https://craftcms.com/docs/config-settings#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.
  
  
  ---
  
  