2

I need to check on some checksums to confirm if the duration matched the setting (which we had set at 90 days but mysteriously was showing as '7' again when i went to check the Misc. settings. Can anyone tell me which table the data is in?

Should this find it for me - if so I guess the field has an unrelated name

SELECT DISTINCT TABLE_NAME 
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%checksum%'
    AND TABLE_SCHEMA='<my-database>';
2

1 Answer 1

4

The checksum is not stored in the database, have a look at CRM_Contact_BAO_Contact_Utils more specifically at the methods generateChecksum and validChecksum.

The genereateChecksum method returns the checksum like $checksum_$timestamt_$life the life is in hours, so for a given checksum you could tell when was generated and what was is expire date.

The validChecksum method takes the $contact_id and a $checksum And validates it. This method is called when a profile/contribution/event/etc page is rendered and is taken from the requested URL.

2
  • Andrei - thank you very much. do you know does this mean if there is a way that i can investigate whether a specific checksum that was sent out had a 7 day or a 90 day life
    – petednz - fuzion
    May 31, 2016 at 19:30
  • If you know the actual checksum yes, the last bit (after the second _ underscore) is the lifetime of that checksum in hours, ie cs=a135dc716e4e859155cf1123c11bcc27_1464650985_168 168 / 24 hours = 7 days
    – Andrei
    May 31, 2016 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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