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:

  object(stdClass)#240 (3) {
    string(5) "21506"
    string(1) "0"
    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.

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


Kevin Hankens’s picture

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

Patch attached.

philosurfer’s picture

Status: Needs review » Reviewed & tested by the community

Patch works.

Tested Drupal 7.19

greggles’s picture

Status: Reviewed & tested by the community » Fixed

Yep, totally makes sense. Committed!

Thanks for the patch and review.

Status: Fixed » Closed (fixed)

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