When I set the option "Subscribe users to their node follow-up notification emails by default" to true, it is not respected until the option is written in the table "comment_notify_user_settings". This is done when a user opens his preferences and clicks save. Not on creating a new user, and also not for existing users. When the user opens his profile settings, the option is checked in the form - but not written to the database until he hits save. This might be confusing.

Deleting the line for this user in that table results in the user not getting notified on comments to his nodes anymore, even though default should be according to "Subscribe users to their node follow-up notification emails by default".

Thanks for the module!

Burt

CommentFileSizeAuthor
#2 774826_use_defaults_if_user_has_none.patch1000 bytesgreggles
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

burtner22’s picture

Can be solved by changing line 407:

OLD: if (!empty($author->node_notify_mailalert) && $author->node_notify_mailalert == 1 && $user->uid != $author->uid && node_access('view', $node, $author)) {
NEW: if ($author->node_notify_mailalert != "0" && $user->uid != $author->uid && node_access('view', $node, $author)) {

Burt

greggles’s picture

Status: Active » Needs review
FileSize
1000 bytes

Sorry I'm coming around to this after so much time. I wonder what the value is in $author->node_notify_mailalert that it is "not equal to the string 0." You may have fixed it for your site, but broke it for someone with a different default value.

Here's an alternate approach that solves the problem more generally.

greggles’s picture

Status: Needs review » Closed (duplicate)

Marking as a duplicate of #862730: Node authors not geting notification unless they save their account page since that has more people following it.