From: jitendrapurohit Date: Tue, 21 Sep 2021 04:29:37 +0000 (+0530) Subject: Do not notify user if not set in the params X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0f59af38f855b2f71707ef4da3c5cfa1eb002bc1;hp=af4b67df0d01f328a1af862e75ffad9f87b4bf1a;p=civicrm-core.git Do not notify user if not set in the params --- diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index a1ef60ee45..06db470714 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -82,10 +82,11 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { // self-registers. // - 'register_pending_approval': Welcome message, user pending admin // approval. - // @Todo: Should we only send off emails if $params['notify'] is set? switch (TRUE) { case $user_register_conf == 'admin_only' || $user->isAuthenticated(): - _user_mail_notify('register_admin_created', $account); + if (!empty($params['notify'])) { + _user_mail_notify('register_admin_created', $account); + } break; case $user_register_conf == 'visitors':