/** * 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(); } }