From 4a5409cd0016efd9dd074ad041a355aaaba49f39 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Tue, 26 Feb 2013 05:00:04 +0100 Subject: [PATCH] Log confirmed subscriptions --- public_html/modules/confirm.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public_html/modules/confirm.php b/public_html/modules/confirm.php index 92b506e..eef7862 100644 --- a/public_html/modules/confirm.php +++ b/public_html/modules/confirm.php @@ -20,6 +20,15 @@ try $sSubscription->uIsConfirmed = true; $sSubscription->InsertIntoDatabase(); + $sLogEntry = new LogEntry(0); + $sLogEntry->uType = LogEntry::SUBSCRIPTION_CONFIRMED; + $sLogEntry->uIp = $_SERVER['REMOTE_ADDR']; + $sLogEntry->uData = json_encode(array("email" => $router->uParameters[1])); + $sLogEntry->uCampaignId = $sCampaign->sId; + $sLogEntry->uDate = time(); + $sLogEntry->uSessionId = session_id(); + $sLogEntry->InsertIntoDatabase(); + flash_notice("Your subscription was successfully confirmed. Welcome on board!"); redirect("/manage/{$sSubscription->sEmailAddress}/{$sSubscription->sSettingsKey}"); }