Commit 6102a1b3 authored by gnuget's avatar gnuget Committed by greggles

Issue #2853329 by gnuget, DamienMcKenna: Comment Notify block Create New User...

Issue #2853329 by gnuget, DamienMcKenna: Comment Notify block Create New User on Drupal 8 when the preferences are disabled
parent 6b7da6a4
......@@ -246,7 +246,7 @@ function _comment_notify_submit_user_form(array &$form, FormStateInterface $form
/** @var \Drupal\user\UserInterface $user */
$user = $form_state->getFormObject()->getEntity();
if (!$user->isAnonymous()) {
if (!$user->isAnonymous() && is_integer($form_state->getValue('node_notify')) && is_integer($form_state->getValue('comment_notify'))) {
// Save the values to {comment_notify_user_settings}.
comment_notify_set_user_notification_setting($user->id(), $form_state->getValue('node_notify'), $form_state->getValue('comment_notify'));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment