From: Herb v/d Dool Date: Thu, 21 Oct 2021 17:10:24 +0000 (-0400) Subject: Show correct CMS name for profile uf group types X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3514b4c89870eec7fabd828d4209c4540e7a277f;p=civicrm-core.git Show correct CMS name for profile uf group types --- diff --git a/CRM/Core/SelectValues.php b/CRM/Core/SelectValues.php index 2830c67782..da7e310601 100644 --- a/CRM/Core/SelectValues.php +++ b/CRM/Core/SelectValues.php @@ -237,10 +237,7 @@ class CRM_Core_SelectValues { ]; if (CRM_Core_Config::singleton()->userSystem->supports_form_extensions) { - $ufGroupType += [ - 'User Registration' => ts('Drupal User Registration'), - 'User Account' => ts('View/Edit Drupal User Account'), - ]; + $ufGroupType += CRM_Core_Config::singleton()->userSystem->getUfGroupTypes(); } return $ufGroupType; } diff --git a/CRM/Utils/System/Backdrop.php b/CRM/Utils/System/Backdrop.php index 3fb3b6cc77..692669e82f 100644 --- a/CRM/Utils/System/Backdrop.php +++ b/CRM/Utils/System/Backdrop.php @@ -1068,4 +1068,15 @@ AND u.status = 1 return str_replace(parent::getCRMDatabasePrefix(), '`', ''); } + /** + * Return the CMS-specific UF Group Types for profiles. + * @return array + */ + public function getUfGroupTypes() { + return [ + 'User Registration' => ts('Backdrop User Registration'), + 'User Account' => ts('View/Edit Backdrop User Account'), + ]; + } + } diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index 933a952a59..a2bf46e7a1 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -1082,4 +1082,12 @@ abstract class CRM_Utils_System_Base { return TRUE; } + /** + * Return the CMS-specific UF Group Types for profiles. + * @return array + */ + public function getUfGroupTypes() { + return []; + } + } diff --git a/CRM/Utils/System/DrupalBase.php b/CRM/Utils/System/DrupalBase.php index e4cf7edf2c..075f9d973e 100644 --- a/CRM/Utils/System/DrupalBase.php +++ b/CRM/Utils/System/DrupalBase.php @@ -709,4 +709,15 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { return ['ufAccessURL' => url('admin/people/permissions')]; } + /** + * Return the CMS-specific UF Group Types for profiles. + * @return array + */ + public function getUfGroupTypes() { + return [ + 'User Registration' => ts('Drupal User Registration'), + 'User Account' => ts('View/Edit Drupal User Account'), + ]; + } + }