Home Forums Newsletter Plugin Support Improve failure mode when opening a link for an already-deleted subscriber

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #282271
    Anonymous
    Participant

    Hey,

    Our subscriber list is sensitive and stored in a separate system.

    When sending out newsletters, we import all subscribers, send the newsletter, delete the subscribers.

    Recently we noticed that deleting a subscriber will break all links in the already sent-out email!

    The responsible code is in statistics/statistics.php:

                if ($user_id) {
                    $user = Newsletter::instance()->get_user($user_id);
                    if (!$user) {
                        $this->dienow(__('Subscriber not found', 'newsletter'), 'This tracking link contains a reference to a subscriber no more present', 404);
                    }
                }
    

    Instead of returning an error, could we make it so that the link still works please? Here’s my suggestion:

                if ($user_id) {
                    $user = Newsletter::instance()->get_user($user_id);
                    if (!$user) {
    header('Location: ' . apply_filters('newsletter_redirect_url', $url, $email, $user));
    die();
                    }
                }
    
    

    Thanks

    #286368
    Anonymous
    Inactive

    Dear Madame or Sir,

    I have a similar problem. We also have an external database which is connected with wordpress. Yesterday I sent a newsletter with your plugin for the first time – everythink worked fine. Afterwards I then removed the email addresses of some subscribers by hand. Now the links and attachments of all the sent mails are broken:

    “Abonnent nicht gefunden

    Text below only visibile to administrators
    This tracking link contains a reference to a subscriber no more present”

    I’m not sure if this has anything to do with the deleted email addresses. Any suggestion how I fix this? THANKS!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.