summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgnuget2019-03-03 16:10:04 (GMT)
committerDavid Valdez2019-03-03 16:10:04 (GMT)
commit31e5c9fee6063eddece3b8fa197f1931b7fe3d18 (patch)
treeb2b8a5bd6c54323e2eb36a949af92a753e10d955
parent56a37b069065a428b0f0c1391b3faf3a2a3d6e80 (diff)
Issue #3037118 by gnuget, SirClickALot: User choices not properly reflected when re-visiting the user account screen8.x-1.0-beta6
-rw-r--r--comment_notify.module2
-rw-r--r--tests/src/Functional/CommentNotifyUserPreferencesTest.php1
2 files changed, 2 insertions, 1 deletions
diff --git a/comment_notify.module b/comment_notify.module
index 7b89f91..c128f78 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 03d86ea..2ad1205 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