From fee6edcef7dd9f4f18bcc13f3beade740b1794e9 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 3 Sep 2020 00:19:19 +0100 Subject: [PATCH] Do not block user incase 'Require approval' is checked --- CRM/Utils/System/Drupal8.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index 78479501e3..feb6dc58e5 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -49,7 +49,7 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { if ($user_register_conf != 'visitors' && !$user->hasPermission('administer users')) { $account->block(); } - elseif (!$verify_mail_conf) { + elseif ($verify_mail_conf) { $account->activate(); } @@ -98,7 +98,7 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { } // If this is a user creating their own account, login them in! - if ($account->isActive() && $user->isAnonymous()) { + if (!$verify_mail_conf && $account->isActive() && $user->isAnonymous()) { \user_login_finalize($account); } -- 2.25.1