3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 class CRM_Mailing_Page_Confirm
extends CRM_Core_Page
{
23 public function run() {
24 CRM_Utils_System
::addHTMLHead('<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">');
26 $contact_id = CRM_Utils_Request
::retrieve('cid', 'Integer');
27 $subscribe_id = CRM_Utils_Request
::retrieve('sid', 'Integer');
28 $hash = CRM_Utils_Request
::retrieve('h', 'String');
34 throw new CRM_Core_Exception(ts("Missing input parameters"));
37 $result = CRM_Mailing_Event_BAO_Confirm
::confirm($contact_id, $subscribe_id, $hash);
38 if ($result === FALSE) {
39 $this->assign('success', $result);
42 $this->assign('success', TRUE);
43 $this->assign('group', $result);
46 list($displayName, $email) = CRM_Contact_BAO_Contact_Location
::getEmailDetails($contact_id);
47 $this->assign('display_name', $displayName);
48 $this->assign('email', $email);