Commit 9402c455 authored by Neil Drumm's avatar Neil Drumm 👋
Browse files

Issue #2968016: Allow GDPR consent on subscribing for membership and hosting...

Issue #2968016: Allow GDPR consent on subscribing for membership and hosting emails, if logged in with a confirmed email address
parent 51bdce79
Loading
Loading
Loading
Loading
+6
Changes for drupalorg/drupalorg.module: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -7752,6 +7752,12 @@ function drupalorg_form_mailchimp_signup_subscribe_form_alter(&$form, &$form_sta
    hide($form['mergevars']['LNAME']);
  }

  // Do not allow GDPR consent if the email has not been validated.
  if (empty($GLOBALS['user']->roles[DRUPAL_AUTHENTICATED_RID])) {
    $form['gdpr_consent']['#required'] = FALSE;
    hide($form['gdpr_consent']);
  }

  // Try to fill out country.
  if (user_is_logged_in() && !empty($account_wrapper->field_country->value())) {
    $form['mergevars']['COUNTRY']['#type'] = 'value';
+13 −6

File changed.

Preview size limit exceeded, changes collapsed.