Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-9254

Allow checksum expire to be configured

    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;

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              colemanw Coleman Watts
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Time Spent - 30 minutes Remaining Estimate - 30 minutes
                30m
                Logged:
                Time Spent - 30 minutes Remaining Estimate - 30 minutes
                30m