当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Core_BAO_CMSUser::synchronize方法代码示例

本文整理汇总了PHP中CRM_Core_BAO_CMSUser::synchronize方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_CMSUser::synchronize方法的具体用法?PHP CRM_Core_BAO_CMSUser::synchronize怎么用?PHP CRM_Core_BAO_CMSUser::synchronize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Core_BAO_CMSUser的用法示例。


在下文中一共展示了CRM_Core_BAO_CMSUser::synchronize方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: civicrm_api3_nsynch_user

/**
 * Add an execute function for nsynch
 * http://booki.flossmanuals.net/civicrm-developer-guide/api/
 */
function civicrm_api3_nsynch_user($params)
{
    // execute function
    try {
        // execute
        CRM_Core_BAO_CMSUser::synchronize(FALSE);
        return civicrm_api3_create_success($values, $params);
    } catch (Exception $e) {
        // exception
        return civicrm_api3_create_error('Caught exception: ', $e->getMessage(), '\\n');
    }
}
开发者ID:kewljuice,项目名称:be.ctrl.nsynch,代码行数:16,代码来源:User.php

示例2: run

 /**
  * Run the page.
  *
  * This method is called after the page is created. It checks for the
  * type of action and executes that action.
  * Finally it calls the parent's run method.
  *
  * @return void
  * @access public
  *
  */
 function run()
 {
     //if javascript is enabled
     if (CRM_Utils_Request::retrieve('confirmed', 'Boolean', $this, '', '', 'GET')) {
         CRM_Core_BAO_CMSUser::synchronize();
         return;
     }
     $controller = new CRM_Core_Controller_Simple('CRM_Admin_Form_CMSUser', 'Synchronize CMS Users');
     // set the userContext stack
     $session = CRM_Core_Session::singleton();
     $session->pushUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
     $controller->setEmbedded(TRUE);
     $controller->process();
     $controller->run();
     return parent::run();
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:27,代码来源:CMSUser.php

示例3: civicrm_initialize

<?php

civicrm_initialize();
// -----------------------------
// Get a list of users to update
if (!getenv('INSTALL_DASHBOARD_USERS')) {
    throw new RuntimeException('Missing environment variable: INSTALL_DASHBOARD_USERS');
}
$users = explode(';', getenv('INSTALL_DASHBOARD_USERS'));
CRM_Core_BAO_CMSUser::synchronize(FALSE);
// ------------------------------
// Get list of available dashlets
$reportInstanceResult = civicrm_api3('ReportInstance', 'get', array('option.limit' => 0));
$reportInstanceNames = CRM_Utils_Array::index(array('report_id'), $reportInstanceResult['values']);
$dashletTypeResult = civicrm_api3('Dashboard', 'get', array('domain_id' => CRM_Core_Config::domainID()));
$dashletTypes = CRM_Utils_Array::index(array('name'), $dashletTypeResult['values']);
// ---------------------------------------
// Build list of specific dashlets to add
$dashlets = array(array('dashboard_id' => $dashletTypes['report/' . $reportInstanceNames['event/summary']['id']]['id'], 'column_no' => 0, 'is_minimized' => 0, 'is_fullscreen' => 1, 'weight' => 1), array('dashboard_id' => $dashletTypes['report/' . $reportInstanceNames['contribute/topDonor']['id']]['id'], 'column_no' => 0, 'is_minimized' => 0, 'is_fullscreen' => 1, 'weight' => 3), array('dashboard_id' => $dashletTypes['report/' . $reportInstanceNames['contribute/summary']['id']]['id'], 'column_no' => 0, 'is_minimized' => 0, 'is_fullscreen' => 1, 'weight' => 4), array('dashboard_id' => $dashletTypes['activity']['id'], 'column_no' => 1, 'is_minimized' => 0, 'is_fullscreen' => 1, 'weight' => 10), array('dashboard_id' => $dashletTypes['myCases']['id'], 'column_no' => 1, 'is_minimized' => 0, 'is_fullscreen' => 1, 'weight' => 11), array('dashboard_id' => $dashletTypes['report/' . $reportInstanceNames['member/summary']['id']]['id'], 'column_no' => 1, 'is_minimized' => 0, 'is_fullscreen' => 1, 'weight' => 12));
// -------------------
// Insert the dashlets
$tx = new CRM_Core_Transaction();
try {
    foreach ($users as $user) {
        foreach ($dashlets as $dashlet) {
            $dashlet['contact_id'] = "@user:{$user}";
            $dashlet['is_active'] = 1;
            $dashlet['debug'] = 1;
            civicrm_api3('dashboard_contact', 'create', $dashlet);
        }
    }
开发者ID:rubofvil,项目名称:civicrm-buildkit,代码行数:31,代码来源:install-dashboard.php

示例4: postProcess

 /**
  * Function to process the form
  *
  * @access public
  *
  * @return None
  */
 public function postProcess()
 {
     CRM_Core_BAO_CMSUser::synchronize();
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:11,代码来源:CMSUser.php

示例5: postProcess

 /**
  * Function to process the form
  *
  * @access public
  * @return None
  */
 public function postProcess()
 {
     require_once 'CRM/Core/BAO/CMSUser.php';
     CRM_Core_BAO_CMSUser::synchronize();
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:11,代码来源:CMSUser.php


注:本文中的CRM_Core_BAO_CMSUser::synchronize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。