Beispiel #1
0
 /**
  * Verify the hash of a subscription event.
  *
  * @param int $contact_id
  *   ID of the contact.
  * @param int $subscribe_id
  *   ID of the subscription event.
  * @param string $hash
  *   Hash to verify.
  *
  * @return object|null
  *   The subscribe event object, or null on failure
  */
 public static function &verify($contact_id, $subscribe_id, $hash)
 {
     $success = NULL;
     $se = new CRM_Mailing_Event_BAO_Subscribe();
     $se->contact_id = $contact_id;
     $se->id = $subscribe_id;
     $se->hash = $hash;
     if ($se->find(TRUE)) {
         $success = $se;
     }
     return $success;
 }