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


PHP Tinebase_User::getBackendConfigurationDefaults方法代码示例

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


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

示例1: testGetBackendConfigurationDefaults

 /**
  * get backend cfg defaults
  */
 public function testGetBackendConfigurationDefaults()
 {
     $defaults = Tinebase_User::getBackendConfigurationDefaults();
     $this->assertTrue(isset($defaults[Tinebase_User::SQL]) || array_key_exists(Tinebase_User::SQL, $defaults));
     $this->assertTrue(isset($defaults[Tinebase_User::LDAP]) || array_key_exists(Tinebase_User::LDAP, $defaults));
     $this->assertTrue(is_array($defaults[Tinebase_User::LDAP]));
     $this->assertFalse(isset($defaults['host']) || array_key_exists('host', $defaults));
     $defaults = Tinebase_User::getBackendConfigurationDefaults(Tinebase_User::LDAP);
     $this->assertTrue(isset($defaults['host']) || array_key_exists('host', $defaults));
     $this->assertFalse(isset($defaults[Tinebase_User::LDAP]) || array_key_exists(Tinebase_User::LDAP, $defaults));
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:14,代码来源:UserTest.php

示例2: update_2

 /**
  * update to 2.3
  * - move accounts storage configuration from config.inc.php to config db table
  * - changed the way the configuration for default user group name and default admin group name is stored
  *  
  */
 public function update_2()
 {
     $config = Setup_Controller::getInstance()->getConfigData();
     if (!empty($config['accounts'])) {
         if (empty($config['accounts']['backend'])) {
             $config['accounts']['backend'] = 'Sql';
         }
         $backendType = ucfirst($config['accounts']['backend']);
         Tinebase_User::setBackendType($backendType);
         //add default settings
         $defaultConfig = Tinebase_User::getBackendConfigurationDefaults($backendType);
         Tinebase_User::setBackendConfiguration($defaultConfig);
         //override default settings with config.inc.php settings
         if (!empty($config['accounts'][$config['accounts']['backend']])) {
             if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
                 Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Setting config: ' . print_r($config['accounts'][$config['accounts']['backend']], TRUE));
             }
             Tinebase_User::setBackendConfiguration($config['accounts'][$config['accounts']['backend']]);
         }
         //delete old config settings from config.inc.php
         unset($config['accounts']);
     }
     $defaultUserGroupName = Tinebase_Config::getInstance()->get('Default User Group', 'Users');
     $defaultAdminGroupName = Tinebase_Config::getInstance()->get('Default Admin Group', 'Administrators');
     Tinebase_User::setBackendConfiguration($defaultUserGroupName->value, Tinebase_User::DEFAULT_USER_GROUP_NAME_KEY);
     Tinebase_User::setBackendConfiguration($defaultAdminGroupName->value, Tinebase_User::DEFAULT_ADMIN_GROUP_NAME_KEY);
     //write changes to config table
     Tinebase_User::saveBackendConfiguration();
     Tinebase_Config::getInstance()->delete('Default User Group');
     Tinebase_Config::getInstance()->delete('Default Admin Group');
     $this->setApplicationVersion('Tinebase', '2.3');
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:38,代码来源:Release2.php


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