Follow up to an earlier question:
I am writing a simple custom Drupal module to display information about a contact's related organizations (see above for more background if interested).
One use case is that a logged in user sees this info, in which case determining whether to show the info is easy (I just use the Drupal contact ID to pull information from CiviCRM).
However, if someone visits the page from a checksum link sent via CiviMail, Drupal considers the user to be anonymous. I can pull the
cid (CiviCRM contact ID) from the URL easily enough, but I need to be able to also verify the checksum in order to display information without a possibility of an information leak. How do I do that?
I found this function:
CRM_Contact_BAO_Contact_Utils::generateChecksum($contactId) but this generates the checksum. I just need to verify an existing checksum (from the URL), not create a new one.