Add userSystem to Civi facade
authorColeman Watts <coleman@civicrm.org>
Sun, 22 Nov 2015 01:58:33 +0000 (20:58 -0500)
committerColeman Watts <coleman@civicrm.org>
Sun, 22 Nov 2015 01:58:33 +0000 (20:58 -0500)
CRM/Admin/Form/CMSUser.php
CRM/Core/Config.php
Civi.php

index e01b76d8d91f3fb5bb843b04bd13c65d606f9801..7ecfb8ae0f900acecfddf74ea9dc20b987ee8e86 100644 (file)
@@ -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(
index ace4979140472f10f3ad37bec142b0d151ce383b..e34fd5bfc003af02d2234b2c7a8f9021298ca85f 100644 (file)
@@ -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 {
 
index fe16326de75dec4adc5e30a6069cdb2cd449e869..21ee58073123af9c7a33bc7a0a012ed50c664331 100644 (file)
--- 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;
+  }
+
 }