本文整理汇总了PHP中AuthLdap::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthLdap::__construct方法的具体用法?PHP AuthLdap::__construct怎么用?PHP AuthLdap::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthLdap
的用法示例。
在下文中一共展示了AuthLdap::__construct方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*/
public function __construct($instanceid)
{
global $CFG;
//fetch all instances data
parent::__construct($instanceid);
//TODO must be in some setting screen Currently in config.php
$this->config['group_attribute'] = !empty($CFG->ldap_group_attribute) ? $CFG->ldap_group_attribute : 'cn';
$this->config['group_class'] = strtolower(!empty($CFG->ldap_group_class) ? $CFG->ldap_group_class : 'groupOfUniqueNames');
//argh phpldap convert uniqueMember to lowercase array keys when returning the list of members ...
$this->config['memberattribute'] = strtolower(!empty($CFG->ldap_member_attribute) ? $CFG->ldap_member_attribute : 'uniquemember');
$this->config['memberattribute_isdn'] = !empty($CFG->ldap_member_attribute_isdn) ? $CFG->ldap_member_attribute_isdn : 1;
// new setting
$this->config['process_nested_groups'] = !empty($CFG->ldap_process_nested_groups) ? $CFG->ldap_process_nested_groups : false;
/**
* cache for found groups dn
* used for nested groups processing
*/
$this->config['groups_dn_cache'] = array();
$this->anti_recursion_array = array();
// restricted list of values to use in synchying Mahara's groups with some LDAP attribute
if (!empty($CFG->group_synching_ldap_attribute_values)) {
$this->config['group_synching_ldap_attribute_values'] = explode(',', $CFG->group_synching_ldap_attribute_values);
} else {
$this->config['group_synching_ldap_attribute_values'] = array();
}
}