Answers.Body: <p>I'm about 98% sure it would be fine to change the hash. Maybe make a note of the original hash just in case.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-25T15:38:52.897Z
Answers.LastActivityDate: 2022-09-25T15:38:52.897Z
Answers.UserDisplayName: Demerit
Body: <p>Sometimes, someone makes a mistake and sends out a personalized link in a mailing with their contact id and checksum, which is not great. In the past, I've simply created a duplicate contact and merged the old contact into the new one, with the result that the old contact id is no longer valid — which solves the problem.</p>
  <p>But seeing that one can change the contact hash via API4, I wonder if there is any reason not to just change the hash to some other 32-character hexadecimal number, invalidating all checksums for that contact? Or in other words, is the hash used anywhere else beyond just creating and validating checksums?</p>
  <p>There is an <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_invalidateChecksum/" rel="nofollow noreferrer">invalidate checksums hook</a>, but that's not really practical for a one off.</p>
  
Tags: <checksum><contact-hash>
Title: Is it OK to change a contact hash in order to invalidate all checksums for that contact?
ThreadText: # Is it OK to change a contact hash in order to invalidate all checksums for that contact?
  
  (Asked by: username_0 on 2022-09-25)
  
  Sometimes, someone makes a mistake and sends out a personalized link in a mailing with their contact id and checksum, which is not great. In the past, I've simply created a duplicate contact and merged the old contact into the new one, with the result that the old contact id is no longer valid — which solves the problem.
  
  But seeing that one can change the contact hash via API4, I wonder if there is any reason not to just change the hash to some other 32-character hexadecimal number, invalidating all checksums for that contact? Or in other words, is the hash used anywhere else beyond just creating and validating checksums?
  
  There is an [invalidate checksums hook](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_invalidateChecksum/), but that's not really practical for a one off.
  
  **Tags:** checksum, contact-hash
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-09-25. Score: 1
  
  I'm about 98% sure it would be fine to change the hash. Maybe make a note of the original hash just in case.
  
  
  ---
  
  