diff --git a/comment_notify.module b/comment_notify.module index 7b89f91e2b3dddad811c713d2cf3644c988e3620..c128f78250580cbb091bd20639d3b7c84d9f6a0e 100644 --- a/comment_notify.module +++ b/comment_notify.module @@ -254,7 +254,7 @@ function comment_notify_form_user_form_alter(&$form, FormStateInterface &$form_s $form['comment_notify_settings']['entity_notify'] = [ '#type' => 'checkbox', '#title' => t('Receive content follow-up notification e-mails'), - '#default_value' => isset($notify_settings->node_notify) ? $notify_settings->node_notify : NULL, + '#default_value' => isset($notify_settings->entity_notify) ? $notify_settings->entity_notify : NULL, '#description' => t('Check this box to receive an e-mail notification for follow-ups on your content. You can not disable notifications for individual threads.'), ]; } diff --git a/tests/src/Functional/CommentNotifyUserPreferencesTest.php b/tests/src/Functional/CommentNotifyUserPreferencesTest.php index 03d86eace28e02367844d8dd4b81f6e0d71c0848..2ad1205ba1ab2bbb0859dd0e7a35eae6460bc4a7 100644 --- a/tests/src/Functional/CommentNotifyUserPreferencesTest.php +++ b/tests/src/Functional/CommentNotifyUserPreferencesTest.php @@ -189,6 +189,7 @@ class CommentNotifyUserPreferencesTest extends CommentNotifyTestBase { $this->getSession()->getPage()->pressButton(t('Save')); $node_notify_preference = comment_notify_get_user_entity_notify_preference($this->authenticatedUser->id()); $this->assertEquals(COMMENT_NOTIFY_ENTITY, $node_notify_preference); + $this->assertSession()->checkboxChecked(t('Receive content follow-up notification e-mails')); $this->drupalLogout(); // Tests that the notification is sent when the content created by the user