hi, first off thanks for taking time to write this module! It really was needed.

Quick question, it seems that upon install by default all regged users are going to start getting email reply notifications, for anything they posted off in past.

Actually I'd like this off by default for regged users, so they can opt in themselves, and not potentially get unwittingly spammed.

Is there some simple modification I can make to make this off by default instead of on?

thanks!
Kalin

Comments

greggles’s picture

Category: support » feature

I don't think there's any way to do that, so I'm changing this to a feature request.

stamd’s picture

I agree this is a much needed feature, I can't install this and have it spam people without them choosing to receive emails first. I'd get hundreds of complaints.

I looked at the module some to try and figure out how to do this but have been unsuccessful so far :(

thanks for your time making this module it's very needed.

greggles’s picture

Title: disable notifications for regged users by default? » require users to opt in to get mails

Thanks for mentioning this. I recently got a comment on a really old thread and users who never requested updates by email got them. So, I'd like to generally repurpose this to default to not sending mail.

That has the drawback of not "bringing people back for community involvement" quite as often but has the distinct benefit of being more legal (at lesat in the US) and being more respectful to site users. I think the benefits outweight the drawbacks ;)

I haven't investigated where this problem is specifically yet but will try to do so in the future.

David Goodwin’s picture

The mail is sent to everyone (by default) because the database schema sets the "notify me" value to true by default.

stamd’s picture

Oh is that the key,

then if already installed, i think this will revert all to default notify off

alter table comments modify `notify` tinyint(1) NOT NULL DEFAULT '0';
update comments set notify=0;

and for new installs, changing comment_notify.install to

$status[] = db_query("
ALTER TABLE {comments}
ADD COLUMN `notify` tinyint(1) NOT NULL DEFAULT '0'");

instead of

$status[] = db_query("
ALTER TABLE {comments}
ADD COLUMN `notify` tinyint(1) NOT NULL DEFAULT '1'");

for postgres and mysql would be it..?

greggles’s picture

Category: feature » bug
Priority: Normal » Critical

Per comment 3 in http://drupal.org/node/244728 this is a critical bug, not a feature request... (that doesn´t mean I have time to spend on it, but that I agree with that perspective).

greggles’s picture

Status: Active » Needs review
StatusFileSize
new1.88 KB

Ok, I've got a patch to fix this (thanks to stamd in comment #5 for the queries - that helped a lot!).

First, it requires a manual step that I've documented at http://drupal.org/node/252697

Second, it requires a change to the install and all users to run their update.php

I've run this on a site now and it seemed to work. I'd love to get some feedback from other folks before committing it, though.

greggles’s picture

Title: require users to opt in to get mails » require users to opt in to get mails and default to not getting emails
Status: Needs review » Fixed

Ok, I gave this a quick test and it this has been committed to the 5.x branch.

Thanks again, stamd, for your advice.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.