Discussion - ValidateChecksum action should return FALSE instead of throwing an exception, so that other actions can handle the missing Contact ID
Currently the ValidateChecksum action throws an exception, which causes processing to stop. Whereas if it returned FALSE then other actions could check if the Contact ID was empty and do something else.
public function validateParameters(ParameterBagInterface $parameters) {
$contactId = $parameters->getParameter('cid');
$checksum = $parameters->getParameter('cs');
$valid = \CRM_Contact_BAO_Contact_Utils::validChecksum($contactId, $checksum);
if (!$valid) {
throw new InvalidParameterException(E::ts('Invalid checksum, can not access contact data.'));
}
return TRUE;
}