4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
20 namespace Civi\Api4\Action\Contact
;
22 use Civi\Api4\Generic\Result
;
25 * Generate a security checksum for anonymous access to CiviCRM.
27 * @method $this setContactId(int $cid) Set contact ID (required)
28 * @method int getContactId() Get contact ID param
29 * @method $this setChecksum(string $checksum) Set checksum param (required)
30 * @method string getChecksum() Get checksum param
32 class ValidateChecksum
extends \Civi\Api4\Generic\AbstractAction
{
51 * @param \Civi\Api4\Generic\Result $result
53 public function _run(Result
$result) {
55 'valid' => \CRM_Contact_BAO_Contact_Utils
::validChecksum($this->contactId
, $this->checksum
),