本文整理匯總了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();
}
}