From e367c7b0504923a1a5cbf68cbd8ad819b29734c8 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 21 Nov 2015 20:58:33 -0500 Subject: [PATCH] Add userSystem to Civi facade --- CRM/Admin/Form/CMSUser.php | 2 +- CRM/Core/Config.php | 2 ++ Civi.php | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CRM/Admin/Form/CMSUser.php b/CRM/Admin/Form/CMSUser.php index e01b76d8d9..7ecfb8ae0f 100644 --- a/CRM/Admin/Form/CMSUser.php +++ b/CRM/Admin/Form/CMSUser.php @@ -59,7 +59,7 @@ class CRM_Admin_Form_CMSUser extends CRM_Core_Form { * Process the form submission. */ public function postProcess() { - $result = CRM_Core_Config::singleton()->userSystem->synchronizeUsers(); + $result = Civi::userSystem()->synchronizeUsers(); $status = ts('Checked one user record.', array( diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index ace4979140..e34fd5bfc0 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -42,6 +42,8 @@ require_once 'api/api.php'; /** * Class CRM_Core_Config + * + * @property CRM_Utils_System_Base $userSystem */ class CRM_Core_Config extends CRM_Core_Config_MagicMerge { diff --git a/Civi.php b/Civi.php index fe16326de7..21ee580731 100644 --- a/Civi.php +++ b/Civi.php @@ -115,4 +115,11 @@ class Civi { return \Civi\Core\Container::getBootService('settings_manager')->getBagByDomain($domainID); } + /** + * @return \CRM_Utils_System_Base + */ + public static function userSystem() { + return CRM_Core_Config::singleton()->userSystem; + } + } -- 2.25.1