Greetings! I just noticed an issue where a user's configuration does not override the default behavior for node_notify.

The variable node_notify_default_mailalert is set to 1, but the user has unchecked the option for node_notify. This means that the user's object looks like:

  ["comment_notify_settings"]=>
  object(stdClass)#240 (3) {
    ["uid"]=>
    string(5) "21506"
    ["node_notify"]=>
    string(1) "0"
    ["comment_notify"]=>
    string(1) "0"
  }

Then in _comment_notify_mailalert (line 469) it checks to see if it should use the user's setting or the site default. However, the conditional checks empty() on the user setting which evaluates to true if the user has set node_notify to "0". In this case, it ends up using the node_notify_default_mailalert value instead.

Files: 
CommentFileSizeAuthor
#1 comment_notify_node_notify_override_1911870_1.patch1.18 KBKevin Hankens
PASSED: [[SimpleTest]]: [MySQL] 46 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1.18 KB
PASSED: [[SimpleTest]]: [MySQL] 46 pass(es).
[ View ]

Patch attached.

Status:Needs review» Reviewed & tested by the community

Patch works.

Tested Drupal 7.19

Status:Reviewed & tested by the community» Fixed

Yep, totally makes sense. Committed! http://drupalcode.org/project/comment_notify.git/commit/ec1ff8f

Thanks for the patch and review.

Status:Fixed» Closed (fixed)

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