public function execute() { $guestAlert = new SJB_GuestAlert($_REQUEST); $guestAlert->addDataProperty(serialize($this->criteriaData)); $tp = SJB_System::getTemplateProcessor(); try { $guestAlertSID = SJB_GuestAlertManager::getGuestAlertSIDByEmail($guestAlert->getAlertEmail()); $guestAlert->setSID($guestAlertSID); $guestAlert->update(); } catch (Exception $e) { $tp->assign('error', $e->getMessage()); } $tp->display('alert_replaced.tpl'); }
/** * @param SJB_GuestAlert $guestAlert * @return mixed */ public static function sendGuestAlertWelcomeEmail(SJB_GuestAlert $guestAlert) { $data = array('key' => $guestAlert->getVerificationKeyForEmail()); $email = SJB_EmailTemplateEditor::getEmail($guestAlert->getAlertEmail(), self::GUEST_ALERT_WELCOME_EMAIL_SID, $data); return $email->send('Guest Alert Welcome'); }