Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.0.7
-
Fix Version/s: 4.1.0
-
Component/s: None
-
Labels:None
Description
Currently the number of days a checksum will last is hard-coded in CRM/Contact/BAO/Contact/Utils.php, as the number 7. This would be extremely easy to replace with a PHP constant, or a CRM_CORE_CONFIG setting. I don't know enough about civi architecture to know the correct approach, but here's an idea:
Add this to civicrm_settings.php:
/**
- This is the default number of days before a checksum (hashed) link from CiviMail will expire.
*/
define( 'CIVICRM_CS_TIMEOUT' , 7);
And then in CRM/Contact/BAO/Contact/Utils.php, change this:
$live = 24 * 7;
to this:
$live = 24 * CIVICRM_CS_TIMEOUT;