api call for checksum expiration

This commit is contained in:
Sarah Poger Gladstone 2019-05-28 04:39:35 -04:00 committed by GitHub
parent 3802edc486
commit 13f10399e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,6 +198,9 @@ function fancytokens_civicrm_tokens( &$tokens ){
$today = date_create(); $today = date_create();
$checksum_expire_result = civicrm_api3('Setting', 'get', [ 'sequential' => 1, 'return' => ["checksum_timeout"], ]);
$checksum_expire_date_tmp = "" ;
if ($checksum_expire_result['is_error'] == 0 && $checksum_expire_result['count'] == 1){ if ($checksum_expire_result['is_error'] == 0 && $checksum_expire_result['count'] == 1){
$tmp_checksum_int = $checksum_expire_result['values'][0]['checksum_timeout']; $tmp_checksum_int = $checksum_expire_result['values'][0]['checksum_timeout'];
$interval_str = $tmp_checksum_int." days" ; $interval_str = $tmp_checksum_int." days" ;