/** * Check if there is any active server with * * @access private * @param * */ private function initServers() { $server_ids = ilLDAPServer::_getRoleSyncServerIds(); if (!count($server_ids)) { return false; } // Init servers include_once 'Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php'; $this->active_servers = true; $this->mappings = array(); foreach ($server_ids as $server_id) { $this->servers[$server_id] = new ilLDAPServer($server_id); $this->mappings = ilLDAPRoleGroupMappingSettings::_getAllActiveMappings(); } $this->mapping_info = array(); $this->mapping_info_strict = array(); foreach ($this->mappings as $mapping) { foreach ($mapping as $key => $data) { if (strlen($data['info']) and $data['object_id']) { $this->mapping_info[$data['object_id']][] = $data['info']; } if (strlen($data['info']) && $data['info_type'] == ilLDAPRoleGroupMappingSettings::MAPPING_INFO_ALL) { $this->mapping_info_strict[$data['object_id']][] = $data['info']; } } } $this->users = ilObjUser::_getExternalAccountsByAuthMode('ldap', true); return true; }