From: Wouter H Date: Sat, 1 Feb 2020 12:05:09 +0000 (+0100) Subject: Correct check X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c0ff471e012cdc87c108d71e84c1f46287103a60;p=civicrm-core.git Correct check Apply the correct check according to @demeritcowboy --- diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index e52bcb31a6..5bb9933df0 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -162,8 +162,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { } // And if we are given an email address, let's check to see if it already exists. - if (!empty($params[$emailName]) || !empty($params['mail'])) { - $key = (!empty($params[$emailName])) ? $emailName : 'mail'; + if (!empty($params['mail'])) { + $mail = $params['mail']; $user = entity_create('user'); $user->setEmail($params[$key]);