Commit f5793622 authored by chegor's avatar chegor Committed by greggles

Issue #2684617 by chegor, john.money, Berdir: Comment Notify seems to block...

Issue #2684617 by chegor, john.money, Berdir: Comment Notify seems to block Create New User on Drupal 8
parent e788a54a
......@@ -190,7 +190,7 @@ function comment_notify_form_user_form_alter(&$form, FormStateInterface &$form_s
/** @var \Drupal\user\UserInterface $user */
$user = $form_state->getFormObject()->getEntity();
$notify_settings = comment_notify_get_user_notification_setting($user->id()) ?: comment_notify_get_default_notification_setting();
$notify_settings = $user->id() ? comment_notify_get_user_notification_setting($user->id()) : comment_notify_get_default_notification_setting();
$form['comment_notify_settings'] = array(
'#type' => 'details',
......
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