Remove a person from an email (comment) subscription?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Remove a person from an email (comment) subscription?

Post by Timbalu »

Good question...!
I mean there isn't any... at least I never heard about something like this... the data is in each comment of the *_comments table in the field 'subscribed', AFAIK.

Code: Select all

SELECT email FROM serendipity_comments WHERE type = 'NORMAL' AND subscribed = 'true'
It would be nice to have some automatic bounce purge, but I think this wouldn't be easy to make it failsafe. I could be also added by a cleanup plugin, but this also would need you to know which one came back as old and is purgable.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
onli
Regular
Posts: 2828
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Remove a person from an email (comment) subscription?

Post by onli »

RobA wrote: Can someone point me to the code bit where these emails get sent out? I got a complaint from a subscriber that they received multiple email notices from a new comment. They appear to have commented multiple times on the same post, and had the subscribe checked for each...
It doesn't work that way - i do that regularly, that should be no issue. See serendipity_mailSubscribers in include/functions_comments.inc.php. The commenter probably used different email-adresses (no way to work around that). At least if I understand the code correctly ;)
The code also checks for an empty mail, so having subscribed without an email is no real issue as well (it could be nice feature to hide the subscribe-box unless an email is given by the commenter, using visibleif.js or something like that)

Code: Select all

if ($serendipity['dbType'] == 'postgres' ||
    $serendipity['dbType'] == 'pdo-postgres') {
    $pgsql_insert = 'DISTINCT ON (email)';
} else {
    $mysql_insert = 'GROUP BY email';
}

$sql = "SELECT $pgsql_insert author, email, type
        FROM {$serendipity['dbPrefix']}comments
        WHERE entry_id = '". (int)$entry_id ."'
          AND email <> '" . serendipity_db_escape_string($posterMail) . "'
          AND email <> ''
          AND subscribed = 'true' $mysql_insert";
$subscribers = serendipity_db_query($sql);
Ruby On Rails
Posts: 1
Joined: Fri Apr 19, 2013 3:33 pm

Re: Remove a person from an email (comment) subscription?

Post by Ruby On Rails »

I just knew the below technique to manually unsubscribe. That is:
Navigate to the Lists page.
Click the View drop down and select Subscribers for the list that your subscriber is on.
Use the Search Subscribers box. You can use our search function to quickly pull up the address that you want to unsubscribe.
When you enter the person's email address click the orange link to open their profile.
Click the Unsubscribe button.

But, anyway thanks a lot. Will try the URL next time.
Post Reply