Show correct CMS name for profile uf group types
authorHerb v/d Dool <herb@3speedhub.com>
Thu, 21 Oct 2021 17:10:24 +0000 (13:10 -0400)
committerHerb v/d Dool <herb@3speedhub.com>
Thu, 21 Oct 2021 17:13:45 +0000 (13:13 -0400)
CRM/Core/SelectValues.php
CRM/Utils/System/Backdrop.php
CRM/Utils/System/Base.php
CRM/Utils/System/DrupalBase.php

index 2830c67782be2e23f4c27cf813afd08fe9b5bff5..da7e3106019a21e53ab538c2f8749174d3c0842c 100644 (file)
@@ -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;
   }
index 3fb3b6cc776b39c618b8fbe14db05a705a00817e..692669e82f75b3c522c7705ec2139bacb5f489a3 100644 (file)
@@ -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'),
+    ];
+  }
+
 }
index 933a952a597e595a41ef491cd9b5811f7f44138b..a2bf46e7a10bfd5c893c2fb4a9149daea8206165 100644 (file)
@@ -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 [];
+  }
+
 }
index e4cf7edf2c3feb580d7d3b32ef46c70b4192ac25..075f9d973e0d31789ae78e09b8f27b82aef6bfee 100644 (file)
@@ -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'),
+    ];
+  }
+
 }