mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
19 lines
461 B
PHP
19 lines
461 B
PHP
<?
|
|
session_start();
|
|
|
|
$subscription = new NewsletterSubscription();
|
|
|
|
try{
|
|
$subscription = NewsletterSubscription::Get(HttpInput::Str(GET, 'uuid'));
|
|
|
|
if(!$subscription->IsConfirmed){
|
|
$subscription->Confirm();
|
|
$_SESSION['subscription-confirmed'] = $subscription->UserId;
|
|
}
|
|
|
|
http_response_code(Enums\HttpCode::SeeOther->value);
|
|
header('Location: ' . $subscription->Url);
|
|
}
|
|
catch(Exceptions\NewsletterSubscriptionNotFoundException){
|
|
Template::Emit404();
|
|
}
|