ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
ilLDAPServer Class Reference
+ Collaboration diagram for ilLDAPServer:

Public Member Functions

 __construct (int $a_server_id=0)
 
 rotateFallbacks ()
 Rotate fallback urls in case of connect timeouts (move first to end and persist). More...
 
 getServerId ()
 
 enableAuthentication (bool $a_status)
 Enable authentication for this ldap server. More...
 
 isAuthenticationEnabled ()
 Check if authentication is enabled. More...
 
 setAuthenticationMapping (int $a_map)
 Set mapped authentication mapping. More...
 
 getAuthenticationMapping ()
 Get authentication mode that is mapped. More...
 
 getAuthenticationMappingKey ()
 Get authentication mapping key Default is ldap. More...
 
 toggleActive (bool $a_status)
 
 isActive ()
 
 getUrl ()
 
 setUrl (string $a_url)
 Set server URL(s). More...
 
 getUrlString ()
 
 doConnectionCheck (bool $prevent_persisted_rotation=false)
 Check ldap connection and do a fallback to the next server if no connection is possible. More...
 
 getName ()
 
 setName (string $a_name)
 
 getVersion ()
 
 setVersion (int $a_version)
 
 getBaseDN ()
 
 setBaseDN (string $a_base_dn)
 
 isActiveReferrer ()
 
 toggleReferrer (bool $a_status)
 
 isActiveTLS ()
 
 toggleTLS (bool $a_status)
 
 getBindingType ()
 
 setBindingType (int $a_type)
 
 getBindUser ()
 
 setBindUser (string $a_user)
 
 getBindPassword ()
 
 setBindPassword (string $a_password)
 
 getSearchBase ()
 
 setSearchBase (string $a_search_base)
 
 getUserAttribute ()
 
 setUserAttribute (string $a_user_attr)
 
 getFilter ()
 
 setFilter (string $a_filter)
 
 getGroupDN ()
 
 setGroupDN (string $a_value)
 
 getGroupFilter ()
 
 setGroupFilter (string $a_value)
 
 getGroupMember ()
 
 setGroupMember (string $a_value)
 
 getGroupName ()
 
 setGroupName (string $a_value)
 
 getGroupNames ()
 Get group names as array. More...
 
 getGroupAttribute ()
 
 setGroupAttribute (string $a_value)
 
 toggleMembershipOptional (bool $a_status)
 
 isMembershipOptional ()
 
 setGroupUserFilter (string $a_filter)
 
 getGroupUserFilter ()
 
 enabledGroupMemberIsDN ()
 
 enableGroupMemberIsDN (bool $a_value)
 
 setGroupScope (int $a_value)
 
 getGroupScope ()
 
 setUserScope (int $a_value)
 
 getUserScope ()
 
 enabledSyncOnLogin ()
 
 enableSyncOnLogin (bool $a_value)
 
 enabledSyncPerCron ()
 
 enableSyncPerCron (bool $a_value)
 
 setGlobalRole (int $a_role)
 
 getRoleBindDN ()
 
 setRoleBindDN (string $a_value)
 
 getRoleBindPassword ()
 
 setRoleBindPassword (string $a_value)
 
 enabledRoleSynchronization ()
 
 enableRoleSynchronization (bool $a_value)
 
 getUsernameFilter ()
 
 setUsernameFilter (string $a_value)
 
 enableEscapeDN (bool $a_value)
 
 enabledEscapeDN ()
 
 enableAccountMigration (bool $a_status)
 Enable account migration. More...
 
 isAccountMigrationEnabled ()
 enabled account migration More...
 
 validate ()
 Validate user input. More...
 
 getUrlValidationError ()
 Return URL validation error message if URL list is invalid, null otherwise. More...
 
 create ()
 
 update ()
 
 delete ()
 delete More...
 
 toPearAuthArray ()
 Creates an array of options compatible to PEAR Auth. More...
 

Static Public Member Functions

static getInstanceByServerId (int $a_server_id)
 Get instance by server id. More...
 
static checkLDAPLib ()
 Check if ldap module is installed. More...
 
static _getActiveServerList ()
 Get active server list. More...
 
static _getCronServerIds ()
 Get list of acticve servers with option 'SyncCron'. More...
 
static _getRoleSyncServerIds ()
 Check whether there if there is an active server with option role_sync_active. More...
 
static _getFirstActiveServer ()
 Get first active server. More...
 
static _getServerList ()
 Get list of all configured servers. More...
 
static getServerIds ()
 Get all server ids. More...
 
static _getAllServer ()
 Get list of all configured servers. More...
 
static getAvailableDataSources (int $a_auth_mode)
 
static isDataSourceActive (int $a_auth_mode)
 Check if a data source is active for a specific auth mode. More...
 
static getDataSource (int $a_auth_mode)
 
static disableDataSourceForAuthMode (int $a_authmode)
 Disable data source. More...
 
static toggleDataSource (int $a_ldap_server_id, int $a_auth_mode, int $a_status)
 Toggle Data Source. More...
 
static isAuthModeLDAP (string $a_auth_mode)
 Check if user auth mode is LDAP. More...
 
static getServerIdByAuthMode (string $a_auth_mode)
 Get auth id by auth mode. More...
 
static getAuthModeByKey (string $a_auth_key)
 get auth mode by key More...
 
static getKeyByAuthMode (string $a_auth_mode)
 Get auth id by auth mode. More...
 

Data Fields

const LDAP_BIND_ANONYMOUS = 0
 
const LDAP_BIND_USER = 1
 
const LDAP_SCOPE_SUB = 0
 
const LDAP_SCOPE_ONE = 1
 
const LDAP_SCOPE_BASE = 2
 
const DEFAULT_NETWORK_TIMEOUT = 5
 

Private Member Functions

 prepareFilter (string $a_filter)
 Create brackets for filters if they do not exist. More...
 
 getPearAtributeArray ()
 Get attribute array for pear auth data. More...
 
 read ()
 Read server settings. More...
 

Private Attributes

const DEBUG = false
 
const DEFAULT_VERSION = 3
 
string $role_bind_dn = ''
 
string $role_bind_pass = ''
 
bool $role_sync_active = false
 
int $server_id
 
ILIAS LDAP Server ServerUrlList $url_list
 
bool $enabled_authentication = true
 
int $authentication_mapping = 0
 
bool $escape_dn = false
 
bool $active = false
 
string $name = ''
 
int $version = self::DEFAULT_VERSION
 
string $base_dn = ''
 
bool $referrals = false
 
bool $tls = false
 
int $binding_type = self::LDAP_BIND_ANONYMOUS
 
string $bind_user = ''
 
string $bind_password = ''
 
string $search_base = ''
 
string $user_attribute = ''
 
int $user_scope = self::LDAP_SCOPE_ONE
 
string $group_filter = ''
 
string $filter = ''
 
string $group_dn = ''
 
string $group_member = ''
 
int $group_scope = self::LDAP_SCOPE_ONE
 
string $group_name = ''
 
bool $memberisdn = false
 
string $group_attribute = ''
 
bool $group_optional = true
 
string $group_user_filter = ''
 
bool $sync_on_login = false
 
bool $sync_per_cron = false
 
bool $account_migration = false
 
string $username_filter = ''
 
int $global_role = 0
 
ilDBInterface $db
 
ilLanguage $lng
 
ilErrorHandling $ilErr
 
ilLogger $logger
 

Static Private Attributes

static array $instances = []
 

Detailed Description

Definition at line 21 of file class.ilLDAPServer.php.

Constructor & Destructor Documentation

◆ __construct()

ilLDAPServer::__construct ( int  $a_server_id = 0)

Definition at line 80 of file class.ilLDAPServer.php.

81 {
82 global $DIC;
83
84 $this->db = $DIC->database();
85 $this->lng = $DIC->language();
86 $this->ilErr = $DIC['ilErr'];
87 $this->logger = $DIC->logger()->auth();
88
89 $this->server_id = $a_server_id;
90 $this->url_list = new \ILIAS\LDAP\Server\ServerUrlList();
91
92 $this->read();
93 }
read()
Read server settings.
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\lng(), ILIAS\Repository\logger(), and read().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getActiveServerList()

static ilLDAPServer::_getActiveServerList ( )
static

Get active server list.

Returns
int[] server ids of active ldap server

Definition at line 136 of file class.ilLDAPServer.php.

136 : array
137 {
138 global $DIC;
139
140 $ilDB = $DIC['ilDB'];
141
142 $query = "SELECT server_id FROM ldap_server_settings " .
143 "WHERE active = 1 AND authentication = 1 " .
144 "ORDER BY name ";
145 $res = $ilDB->query($query);
146
147 $server_ids = [];
148
149 while ($row = $ilDB->fetchObject($res)) {
150 $server_ids[] = (int) $row->server_id;
151 }
152 return $server_ids;
153 }
$res
Definition: ltiservices.php:69

References $DIC, $ilDB, $res, and ILIAS\Repository\int().

Referenced by ilAuthUtils\_getActiveAuthModes(), _getFirstActiveServer(), ilAuthUtils\_getMultipleAuthModeOptions(), ilAuthUtils\_hasMultipleAuthenticationMethods(), ilAuthUtils\_isExternalAccountEnabled(), ilUserImportParser\importBeginTag(), ilAuthModeDetermination\read(), and ilUserImportParser\verifyBeginTag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getAllServer()

static ilLDAPServer::_getAllServer ( )
static

Get list of all configured servers.

Returns
list<array<string, string|int|float|null>> list of server

Definition at line 266 of file class.ilLDAPServer.php.

266 : array
267 {
268 global $DIC;
269
270 $ilDB = $DIC['ilDB'];
271
272 $query = 'SELECT * FROM ldap_server_settings ORDER BY name';
273
274 $server = [];
275
276 $res = $ilDB->query($query);
277 while ($row = $ilDB->fetchAssoc($res)) {
278 $server[] = $row;
279 }
280 return $server;
281 }
$server
Definition: shib_login.php:28

References $DIC, $ilDB, $res, and $server.

Referenced by ilLDAPSettingsGUI\serverListCmd().

+ Here is the caller graph for this function:

◆ _getCronServerIds()

static ilLDAPServer::_getCronServerIds ( )
static

Get list of acticve servers with option 'SyncCron'.

Returns
int[] server ids of active ldap server

Definition at line 160 of file class.ilLDAPServer.php.

160 : array
161 {
162 global $DIC;
163
164 $ilDB = $DIC['ilDB'];
165
166 $query = "SELECT server_id FROM ldap_server_settings " .
167 "WHERE active = 1 " .
168 "AND sync_per_cron = 1 " .
169 "ORDER BY name";
170
171 $res = $ilDB->query($query);
172
173 $server_ids = [];
174
175 while ($row = $ilDB->fetchObject($res)) {
176 $server_ids[] = (int) $row->server_id;
177 }
178 return $server_ids;
179 }

References $DIC, $ilDB, $res, and ILIAS\Repository\int().

Referenced by ilLDAPCronSynchronization\run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getFirstActiveServer()

static ilLDAPServer::_getFirstActiveServer ( )
static

Get first active server.

Returns
int first active server

Definition at line 210 of file class.ilLDAPServer.php.

210 : int
211 {
212 $servers = self::_getActiveServerList();
213 if (count($servers)) {
214 return $servers[0];
215 }
216 return 0;
217 }
static _getActiveServerList()
Get active server list.

References _getActiveServerList().

Referenced by ilECSCmsCourseMemberCommandQueueHandler\createMember().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getRoleSyncServerIds()

static ilLDAPServer::_getRoleSyncServerIds ( )
static

Check whether there if there is an active server with option role_sync_active.

Returns
int[]

Definition at line 185 of file class.ilLDAPServer.php.

185 : array
186 {
187 global $DIC;
188
189 $ilDB = $DIC['ilDB'];
190
191 $query = "SELECT server_id FROM ldap_server_settings " .
192 "WHERE active = 1 " .
193 "AND role_sync_active = 1 ";
194
195 $res = $ilDB->query($query);
196
197 $server_ids = [];
198
199 while ($row = $ilDB->fetchObject($res)) {
200 $server_ids[] = (int) $row->server_id;
201 }
202 return $server_ids;
203 }

References $DIC, $ilDB, $res, and ILIAS\Repository\int().

Referenced by ilLDAPRoleGroupMapping\initServers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getServerList()

static ilLDAPServer::_getServerList ( )
static

Get list of all configured servers.

Returns
int[] list of server ids

Definition at line 224 of file class.ilLDAPServer.php.

224 : array
225 {
226 global $DIC;
227
228 $ilDB = $DIC['ilDB'];
229
230 $query = "SELECT server_id FROM ldap_server_settings ORDER BY name";
231 $res = $ilDB->query($query);
232
233 $server_ids = [];
234
235 while ($row = $ilDB->fetchObject($res)) {
236 $server_ids[] = $row->server_id;
237 }
238 return $server_ids;
239 }

References $DIC, $ilDB, and $res.

Referenced by ilAuthUtils\_getAllAuthModes(), and ilLDAPSettingsGUI\setSubTabs().

+ Here is the caller graph for this function:

◆ checkLDAPLib()

static ilLDAPServer::checkLDAPLib ( )
static

Check if ldap module is installed.

Definition at line 126 of file class.ilLDAPServer.php.

126 : bool
127 {
128 return function_exists('ldap_bind');
129 }

Referenced by ilLDAPSettingsGUI\serverListCmd().

+ Here is the caller graph for this function:

◆ create()

ilLDAPServer::create ( )

Definition at line 892 of file class.ilLDAPServer.php.

892 : int
893 {
894 $next_id = $this->db->nextId('ldap_server_settings');
895
896 $query = 'INSERT INTO ldap_server_settings (server_id,active,name,url,version,base_dn,referrals,tls,bind_type,bind_user,bind_pass,' .
897 'search_base,user_scope,user_attribute,filter,group_dn,group_scope,group_filter,group_member,group_memberisdn,group_name,' .
898 'group_attribute,group_optional,group_user_filter,sync_on_login,sync_per_cron,role_sync_active,role_bind_dn,role_bind_pass,migration, ' .
899 'authentication,authentication_type,username_filter, escape_dn) ' .
900 'VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)';
901 $this->db->queryF(
902 $query,
903 array(
904 'integer','integer','text','text','integer','text','integer','integer','integer','text','text','text','integer',
905 'text','text','text','integer','text','text','integer','text','text','integer','text','integer','integer','integer',
906 'text','text', 'integer','integer','integer',"text", 'integer'),
907 array(
908 $next_id,
909 $this->isActive(),
910 $this->getName(),
911 $this->getUrlString(),
912 $this->getVersion(),
913 $this->getBaseDN(),
914 $this->isActiveReferrer(),
915 $this->isActiveTLS(),
916 $this->getBindingType(),
917 $this->getBindUser(),
918 $this->getBindPassword(),
919 $this->getSearchBase(),
920 $this->getUserScope(),
921 $this->getUserAttribute(),
922 $this->getFilter(),
923 $this->getGroupDN(),
924 $this->getGroupScope(),
925 $this->getGroupFilter(),
926 $this->getGroupMember(),
927 $this->enabledGroupMemberIsDN(),
928 $this->getGroupName(),
929 $this->getGroupAttribute(),
930 $this->isMembershipOptional(),
931 $this->getGroupUserFilter(),
932 $this->enabledSyncOnLogin(),
933 $this->enabledSyncPerCron(),
935 $this->getRoleBindDN(),
936 $this->getRoleBindPassword(),
940 $this->getUsernameFilter(),
941 (int) $this->enabledEscapeDN()
942 )
943 );
944 // end Patch Name Filter
945 $this->server_id = $next_id;
946 return $next_id;
947 }
isAuthenticationEnabled()
Check if authentication is enabled.
getAuthenticationMapping()
Get authentication mode that is mapped.
isAccountMigrationEnabled()
enabled account migration

References enabledEscapeDN(), enabledGroupMemberIsDN(), enabledRoleSynchronization(), enabledSyncOnLogin(), enabledSyncPerCron(), getAuthenticationMapping(), getBaseDN(), getBindingType(), getBindPassword(), getBindUser(), getFilter(), getGroupAttribute(), getGroupDN(), getGroupFilter(), getGroupMember(), getGroupName(), getGroupScope(), getGroupUserFilter(), getName(), getRoleBindDN(), getRoleBindPassword(), getSearchBase(), getUrlString(), getUserAttribute(), getUsernameFilter(), getUserScope(), getVersion(), isAccountMigrationEnabled(), isActive(), isActiveReferrer(), isActiveTLS(), isAuthenticationEnabled(), and isMembershipOptional().

+ Here is the call graph for this function:

◆ delete()

ilLDAPServer::delete ( )

delete

Definition at line 994 of file class.ilLDAPServer.php.

994 : void
995 {
996 if (!$this->getServerId()) {
997 //TODO check if we need return false
998 return;
999 }
1000
1002
1004
1005 foreach ($rules as $ruleAssigment) {
1006 $ruleAssigment->delete();
1007 }
1008
1010
1011 $query = "DELETE FROM ldap_server_settings " .
1012 "WHERE server_id = " . $this->db->quote($this->getServerId(), 'integer');
1013 $this->db->manipulate($query);
1014 }
static _delete(int $a_server_id)
static _getRules($a_server_id)
Get all rules.

References ilLDAPAttributeMapping\_delete(), ilLDAPRoleGroupMappingSettings\_deleteByServerId(), ilLDAPRoleAssignmentRule\_getRules(), and getServerId().

+ Here is the call graph for this function:

◆ disableDataSourceForAuthMode()

static ilLDAPServer::disableDataSourceForAuthMode ( int  $a_authmode)
static

Disable data source.

Definition at line 340 of file class.ilLDAPServer.php.

340 : bool
341 {
342 global $DIC;
343
344 $ilDB = $DIC['ilDB'];
345
346 $query = 'UPDATE ldap_server_settings ' .
347 'SET authentication_type = ' . $ilDB->quote(0, 'integer') . ' ' .
348 'WHERE authentication_type = ' . $ilDB->quote($a_authmode, 'integer');
349 $ilDB->manipulate($query);
350 return true;
351 }

References $DIC, and $ilDB.

Referenced by toggleDataSource().

+ Here is the caller graph for this function:

◆ doConnectionCheck()

ilLDAPServer::doConnectionCheck ( bool  $prevent_persisted_rotation = false)

Check ldap connection and do a fallback to the next server if no connection is possible.

Definition at line 513 of file class.ilLDAPServer.php.

513 : bool
514 {
515 $connection_failures = [];
516
517 // Iterate over a fixed snapshot so overwriting $this->url_list inside the loop does not affect iteration
518 $valid_urls = $this->url_list->validUrls();
519 foreach ($valid_urls as $index => $uri) {
520 $url_string = (string) $uri;
521
522 try {
523 $this->logger->debug('Attempting LDAP connection to: {url}', ['url' => $url_string]);
524 // Need to do a full bind, since openldap return valid connection links for invalid hosts
525 $query = new ilLDAPQuery($this, $url_string);
526 $query->bind(ilLDAPQuery::LDAP_BIND_TEST);
527
528 $this->url_list = $this->url_list->withPrimaryAt($index);
529
530 if ($connection_failures !== []) {
531 $this->logger->info(
532 'Successfully connected to LDAP server: {url} after {failures} failed attempts',
533 [
534 'url' => $url_string,
535 'failures' => count($connection_failures)
536 ]
537 );
538 }
539
540 return true;
541 } catch (ilLDAPQueryException $exc) {
542 $connection_failures[] = $url_string;
543
544 $this->logger->error('LDAP connection failed for server: {url} - {message}', [
545 'url' => $url_string,
546 'message' => $exc->getMessage(),
547 'exception' => $exc
548 ]);
549
550 if (!$prevent_persisted_rotation) {
551 $this->rotateFallbacks();
552 }
553 }
554 }
555
556 $this->logger->warning('No valid LDAP server found. Tried {count} server(s)', [
557 'count' => count($connection_failures),
558 'urls' => implode(', ', $connection_failures)
559 ]);
560
561 return false;
562 }
rotateFallbacks()
Rotate fallback urls in case of connect timeouts (move first to end and persist).

References ilLDAPQuery\LDAP_BIND_TEST, ILIAS\Repository\logger(), and rotateFallbacks().

+ Here is the call graph for this function:

◆ enableAccountMigration()

ilLDAPServer::enableAccountMigration ( bool  $a_status)

Enable account migration.

Definition at line 822 of file class.ilLDAPServer.php.

822 : void
823 {
824 $this->account_migration = $a_status;
825 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableAuthentication()

ilLDAPServer::enableAuthentication ( bool  $a_status)

Enable authentication for this ldap server.

Definition at line 442 of file class.ilLDAPServer.php.

442 : void
443 {
444 $this->enabled_authentication = $a_status;
445 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enabledEscapeDN()

ilLDAPServer::enabledEscapeDN ( )

Definition at line 814 of file class.ilLDAPServer.php.

814 : bool
815 {
816 return $this->escape_dn;
817 }

References $escape_dn.

Referenced by create(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ enabledGroupMemberIsDN()

ilLDAPServer::enabledGroupMemberIsDN ( )

Definition at line 731 of file class.ilLDAPServer.php.

731 : bool
732 {
733 return $this->memberisdn;
734 }

References $memberisdn.

Referenced by create(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ enabledRoleSynchronization()

ilLDAPServer::enabledRoleSynchronization ( )

Definition at line 791 of file class.ilLDAPServer.php.

791 : bool
792 {
794 }

References $role_sync_active.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ enabledSyncOnLogin()

ilLDAPServer::enabledSyncOnLogin ( )

Definition at line 755 of file class.ilLDAPServer.php.

755 : bool
756 {
758 }

References $sync_on_login.

Referenced by create(), getPearAtributeArray(), update(), and validate().

+ Here is the caller graph for this function:

◆ enabledSyncPerCron()

ilLDAPServer::enabledSyncPerCron ( )

Definition at line 763 of file class.ilLDAPServer.php.

763 : bool
764 {
766 }

References $sync_per_cron.

Referenced by create(), update(), and validate().

+ Here is the caller graph for this function:

◆ enableEscapeDN()

ilLDAPServer::enableEscapeDN ( bool  $a_value)

Definition at line 809 of file class.ilLDAPServer.php.

809 : void
810 {
811 $this->escape_dn = $a_value;
812 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableGroupMemberIsDN()

ilLDAPServer::enableGroupMemberIsDN ( bool  $a_value)

Definition at line 735 of file class.ilLDAPServer.php.

735 : void
736 {
737 $this->memberisdn = $a_value;
738 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableRoleSynchronization()

ilLDAPServer::enableRoleSynchronization ( bool  $a_value)

Definition at line 795 of file class.ilLDAPServer.php.

795 : void
796 {
797 $this->role_sync_active = $a_value;
798 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableSyncOnLogin()

ilLDAPServer::enableSyncOnLogin ( bool  $a_value)

Definition at line 759 of file class.ilLDAPServer.php.

759 : void
760 {
761 $this->sync_on_login = $a_value;
762 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableSyncPerCron()

ilLDAPServer::enableSyncPerCron ( bool  $a_value)

Definition at line 767 of file class.ilLDAPServer.php.

767 : void
768 {
769 $this->sync_per_cron = $a_value;
770 }

Referenced by read().

+ Here is the caller graph for this function:

◆ getAuthenticationMapping()

ilLDAPServer::getAuthenticationMapping ( )

Get authentication mode that is mapped.

Definition at line 466 of file class.ilLDAPServer.php.

466 : int
467 {
469 }

References $authentication_mapping.

Referenced by create(), getAuthenticationMappingKey(), and update().

+ Here is the caller graph for this function:

◆ getAuthenticationMappingKey()

ilLDAPServer::getAuthenticationMappingKey ( )

Get authentication mapping key Default is ldap.

Definition at line 475 of file class.ilLDAPServer.php.

475 : string
476 {
477 if ($this->isAuthenticationEnabled() || !$this->getAuthenticationMapping()) {
478 return 'ldap_' . $this->getServerId();
479 }
481 }
static _getAuthModeName($a_auth_key)

References ilAuthUtils\_getAuthModeName(), getAuthenticationMapping(), getServerId(), and isAuthenticationEnabled().

+ Here is the call graph for this function:

◆ getAuthModeByKey()

static ilLDAPServer::getAuthModeByKey ( string  $a_auth_key)
static

get auth mode by key

Definition at line 411 of file class.ilLDAPServer.php.

411 : string
412 {
413 $auth_arr = explode('_', $a_auth_key);
414 if (count($auth_arr) > 1) {
415 return 'ldap_' . $auth_arr[1];
416 }
417 return 'ldap';
418 }

Referenced by ilAuthUtils\_getAuthModeName().

+ Here is the caller graph for this function:

◆ getAvailableDataSources()

static ilLDAPServer::getAvailableDataSources ( int  $a_auth_mode)
static

Definition at line 283 of file class.ilLDAPServer.php.

283 : array
284 {
285 global $DIC;
286
287 $ilDB = $DIC['ilDB'];
288
289 $query = "SELECT server_id FROM ldap_server_settings " .
290 "WHERE active = " . $ilDB->quote(1, 'integer') . " " .
291 "AND authentication = " . $ilDB->quote(0, 'integer') . " " .
292 "AND ( authentication_type = " . $ilDB->quote($a_auth_mode, 'integer') . " " .
293 "OR authentication_type = " . $ilDB->quote(0, 'integer') . ")";
294 $res = $ilDB->query($query);
295
296 $server_ids = array();
297 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
298 $server_ids[] = $row->server_id;
299 }
300 return $server_ids;
301 }
const FETCHMODE_OBJECT

References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.

◆ getBaseDN()

ilLDAPServer::getBaseDN ( )

Definition at line 581 of file class.ilLDAPServer.php.

581 : string
582 {
583 return $this->base_dn;
584 }

References $base_dn.

Referenced by create(), toPearAuthArray(), update(), and validate().

+ Here is the caller graph for this function:

◆ getBindingType()

ilLDAPServer::getBindingType ( )

Definition at line 605 of file class.ilLDAPServer.php.

605 : int
606 {
607 return $this->binding_type;
608 }

References $binding_type.

Referenced by create(), toPearAuthArray(), update(), and validate().

+ Here is the caller graph for this function:

◆ getBindPassword()

ilLDAPServer::getBindPassword ( )

Definition at line 625 of file class.ilLDAPServer.php.

625 : string
626 {
628 }

References $bind_password.

Referenced by create(), toPearAuthArray(), update(), and validate().

+ Here is the caller graph for this function:

◆ getBindUser()

ilLDAPServer::getBindUser ( )

Definition at line 617 of file class.ilLDAPServer.php.

617 : string
618 {
619 return $this->bind_user;
620 }

References $bind_user.

Referenced by create(), toPearAuthArray(), update(), and validate().

+ Here is the caller graph for this function:

◆ getDataSource()

static ilLDAPServer::getDataSource ( int  $a_auth_mode)
static

Definition at line 322 of file class.ilLDAPServer.php.

322 : int
323 {
324 global $DIC;
325
326 $ilDB = $DIC['ilDB'];
327
328 $query = "SELECT server_id FROM ldap_server_settings " .
329 "WHERE authentication_type = " . $ilDB->quote($a_auth_mode, 'integer') . " ";
330 $res = $ilDB->query($query);
331 if ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
332 return $row->server_id;
333 }
334 return 0;
335 }

References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ILIAS\Authentication\Form\ApacheAuthSettingsForm\buildLdapEnableInput().

+ Here is the caller graph for this function:

◆ getFilter()

ilLDAPServer::getFilter ( )

Definition at line 649 of file class.ilLDAPServer.php.

649 : string
650 {
651 return $this->prepareFilter($this->filter);
652 }
prepareFilter(string $a_filter)
Create brackets for filters if they do not exist.
filter(string $filter_id, array $class_path, string $cmd, bool $activated=true, bool $expanded=true)

References ILIAS\Repository\filter(), and prepareFilter().

Referenced by create(), toPearAuthArray(), and update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGroupAttribute()

ilLDAPServer::getGroupAttribute ( )

Definition at line 706 of file class.ilLDAPServer.php.

706 : string
707 {
709 }

References $group_attribute.

Referenced by create(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ getGroupDN()

ilLDAPServer::getGroupDN ( )

Definition at line 657 of file class.ilLDAPServer.php.

657 : string
658 {
659 return $this->group_dn;
660 }

References $group_dn.

Referenced by create(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ getGroupFilter()

ilLDAPServer::getGroupFilter ( )

Definition at line 665 of file class.ilLDAPServer.php.

665 : string
666 {
667 return $this->prepareFilter($this->group_filter);
668 }

References prepareFilter().

Referenced by create(), toPearAuthArray(), and update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGroupMember()

ilLDAPServer::getGroupMember ( )

Definition at line 673 of file class.ilLDAPServer.php.

673 : string
674 {
675 return $this->group_member;
676 }

References $group_member.

Referenced by create(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ getGroupName()

ilLDAPServer::getGroupName ( )

Definition at line 681 of file class.ilLDAPServer.php.

681 : string
682 {
683 return $this->group_name;
684 }

References $group_name.

Referenced by create(), getGroupNames(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ getGroupNames()

ilLDAPServer::getGroupNames ( )

Get group names as array.

Returns
string[]

Definition at line 694 of file class.ilLDAPServer.php.

694 : array
695 {
696 $names = explode(',', $this->getGroupName());
697
698 if (!is_array($names)) {
699 return [];
700 }
701
702 return array_filter(array_map('trim', $names));
703 }

References getGroupName().

+ Here is the call graph for this function:

◆ getGroupScope()

ilLDAPServer::getGroupScope ( )

Definition at line 743 of file class.ilLDAPServer.php.

743 : int
744 {
745 return $this->group_scope;
746 }

References $group_scope.

Referenced by create(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ getGroupUserFilter()

ilLDAPServer::getGroupUserFilter ( )

Definition at line 726 of file class.ilLDAPServer.php.

726 : string
727 {
729 }

References $group_user_filter.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getInstanceByServerId()

◆ getKeyByAuthMode()

static ilLDAPServer::getKeyByAuthMode ( string  $a_auth_mode)
static

Get auth id by auth mode.

Returns
int|string auth_mode

Definition at line 424 of file class.ilLDAPServer.php.

425 {
426 $auth_arr = explode('_', $a_auth_mode);
427 if (count($auth_arr) > 1) {
428 return ilAuthUtils::AUTH_LDAP . '_' . $auth_arr[1];
429 }
431 }
const int AUTH_LDAP

References ilAuthUtils\AUTH_LDAP.

Referenced by ilAuthUtils\_getAuthMode().

+ Here is the caller graph for this function:

◆ getName()

ilLDAPServer::getName ( )

Definition at line 565 of file class.ilLDAPServer.php.

565 : string
566 {
567 return $this->name;
568 }

References $name.

Referenced by create(), update(), and validate().

+ Here is the caller graph for this function:

◆ getPearAtributeArray()

ilLDAPServer::getPearAtributeArray ( )
private

Get attribute array for pear auth data.

Definition at line 1096 of file class.ilLDAPServer.php.

1096 : array
1097 {
1098 if ($this->enabledSyncOnLogin()) {
1100 return array_merge(
1101 array($this->getUserAttribute()),
1102 $mapping->getFields(),
1103 array('dn'),
1105 );
1106 }
1107
1108 return array($this->getUserAttribute());
1109 }
static _getInstanceByServerId(int $a_server_id)
static getAttributeNames($a_server_id)
get all possible attribute names

References ilLDAPAttributeMapping\_getInstanceByServerId(), enabledSyncOnLogin(), ilLDAPRoleAssignmentRules\getAttributeNames(), getServerId(), and getUserAttribute().

Referenced by toPearAuthArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRoleBindDN()

ilLDAPServer::getRoleBindDN ( )

Definition at line 775 of file class.ilLDAPServer.php.

775 : string
776 {
777 return $this->role_bind_dn;
778 }

References $role_bind_dn.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getRoleBindPassword()

ilLDAPServer::getRoleBindPassword ( )

Definition at line 783 of file class.ilLDAPServer.php.

783 : string
784 {
786 }

References $role_bind_pass.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getSearchBase()

ilLDAPServer::getSearchBase ( )

Definition at line 633 of file class.ilLDAPServer.php.

633 : string
634 {
635 return $this->search_base;
636 }

References $search_base.

Referenced by create(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ getServerId()

ilLDAPServer::getServerId ( )

Definition at line 434 of file class.ilLDAPServer.php.

434 : int
435 {
436 return $this->server_id;
437 }

References $server_id.

Referenced by delete(), getAuthenticationMappingKey(), getPearAtributeArray(), rotateFallbacks(), and update().

+ Here is the caller graph for this function:

◆ getServerIdByAuthMode()

static ilLDAPServer::getServerIdByAuthMode ( string  $a_auth_mode)
static

Get auth id by auth mode.

Definition at line 398 of file class.ilLDAPServer.php.

398 : ?int
399 {
400 if (self::isAuthModeLDAP($a_auth_mode)) {
401 $auth_arr = explode('_', $a_auth_mode);
402 return (int) $auth_arr[1];
403 }
404
405 return null;
406 }

Referenced by ilObjAuthSettingsGUI\buildAuthModeDeterminationForm(), ilAuthModeDetermination\getAuthModeSequence(), ilAuthUtils\getAuthModeTranslation(), and ilAuthModeDetermination\read().

+ Here is the caller graph for this function:

◆ getServerIds()

static ilLDAPServer::getServerIds ( )
static

Get all server ids.

Returns
int[]

Definition at line 245 of file class.ilLDAPServer.php.

245 : array
246 {
247 global $DIC;
248
249 $ilDB = $DIC['ilDB'];
250
251 $query = "SELECT server_id FROM ldap_server_settings ORDER BY name";
252
253 $res = $ilDB->query($query);
254
255 $server = [];
256 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
257 $server[] = (int) $row->server_id;
258 }
259 return $server;
260 }

References $DIC, $ilDB, $res, $server, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().

Referenced by ILIAS\Authentication\Form\ApacheAuthSettingsForm\buildLdapEnableInput(), and ilECSParticipantSettingsGUI\parseAvailableAuthModes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUrl()

ilLDAPServer::getUrl ( )

Definition at line 491 of file class.ilLDAPServer.php.

491 : string
492 {
493 return $this->url_list->getConnectionStringAtIndex(0);
494 }

Referenced by toPearAuthArray().

+ Here is the caller graph for this function:

◆ getUrlString()

ilLDAPServer::getUrlString ( )

Definition at line 504 of file class.ilLDAPServer.php.

504 : string
505 {
506 return $this->url_list->toString();
507 }

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getUrlValidationError()

ilLDAPServer::getUrlValidationError ( )

Return URL validation error message if URL list is invalid, null otherwise.

Use for field-level feedback in forms (e.g. server_url setAlert).

Definition at line 878 of file class.ilLDAPServer.php.

878 : ?string
879 {
880 if ($this->url_list->count() === 0) {
881 return $this->lng->txt('ldap_server_url_required');
882 }
883
884 $invalid_parts = $this->url_list->getInvalidParts();
885 if (!empty($invalid_parts)) {
886 return $this->lng->txt('ldap_server_url_invalid_uris') . ' ' . implode(', ', $invalid_parts);
887 }
888
889 return null;
890 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getUserAttribute()

ilLDAPServer::getUserAttribute ( )

Definition at line 641 of file class.ilLDAPServer.php.

641 : string
642 {
644 }

References $user_attribute.

Referenced by create(), getPearAtributeArray(), toPearAuthArray(), update(), and validate().

+ Here is the caller graph for this function:

◆ getUsernameFilter()

ilLDAPServer::getUsernameFilter ( )

Definition at line 800 of file class.ilLDAPServer.php.

800 : string
801 {
803 }

References $username_filter.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getUserScope()

ilLDAPServer::getUserScope ( )

Definition at line 751 of file class.ilLDAPServer.php.

751 : int
752 {
753 return $this->user_scope;
754 }

References $user_scope.

Referenced by create(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ getVersion()

ilLDAPServer::getVersion ( )

Definition at line 573 of file class.ilLDAPServer.php.

573 : int
574 {
575 return $this->version;
576 }

References $version.

Referenced by create(), toPearAuthArray(), update(), and validate().

+ Here is the caller graph for this function:

◆ isAccountMigrationEnabled()

ilLDAPServer::isAccountMigrationEnabled ( )

enabled account migration

Definition at line 830 of file class.ilLDAPServer.php.

830 : bool
831 {
833 }

References $account_migration.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ isActive()

ilLDAPServer::isActive ( )

Definition at line 487 of file class.ilLDAPServer.php.

487 : bool
488 {
489 return $this->active;
490 }

References $active.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ isActiveReferrer()

ilLDAPServer::isActiveReferrer ( )

Definition at line 589 of file class.ilLDAPServer.php.

589 : bool
590 {
591 return $this->referrals;
592 }

References $referrals.

Referenced by create(), toPearAuthArray(), and update().

+ Here is the caller graph for this function:

◆ isActiveTLS()

ilLDAPServer::isActiveTLS ( )

Definition at line 597 of file class.ilLDAPServer.php.

597 : bool
598 {
599 return $this->tls;
600 }

References $tls.

Referenced by create(), toPearAuthArray(), update(), and validate().

+ Here is the caller graph for this function:

◆ isAuthenticationEnabled()

ilLDAPServer::isAuthenticationEnabled ( )

Check if authentication is enabled.

Definition at line 450 of file class.ilLDAPServer.php.

450 : bool
451 {
453 }

References $enabled_authentication.

Referenced by create(), getAuthenticationMappingKey(), and update().

+ Here is the caller graph for this function:

◆ isAuthModeLDAP()

static ilLDAPServer::isAuthModeLDAP ( string  $a_auth_mode)
static

Check if user auth mode is LDAP.

Definition at line 379 of file class.ilLDAPServer.php.

379 : bool
380 {
381 global $DIC;
382
383 $logger = $DIC->logger()->auth();
384
385 if ($a_auth_mode === '') {
386 $logger->error(__METHOD__ . ': No auth mode given..............');
387 return false;
388 }
389
390 $auth_arr = explode('_', $a_auth_mode);
391
392 return ((int) $auth_arr[0] === ilAuthUtils::AUTH_LDAP) && (isset($auth_arr[1]) && $auth_arr[1]);
393 }
error(string $message, array $context=[])

References $DIC, $logger, ilAuthUtils\AUTH_LDAP, and ilLogger\error().

Referenced by ilObjAuthSettingsGUI\buildAuthModeDeterminationForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isDataSourceActive()

static ilLDAPServer::isDataSourceActive ( int  $a_auth_mode)
static

Check if a data source is active for a specific auth mode.

Definition at line 306 of file class.ilLDAPServer.php.

306 : bool
307 {
308 global $DIC;
309
310 $ilDB = $DIC['ilDB'];
311
312 $query = "SELECT server_id FROM ldap_server_settings " .
313 "WHERE authentication_type = " . $ilDB->quote($a_auth_mode, 'integer') . " " .
314 "AND authentication = " . $ilDB->quote(0, 'integer');
315 $res = $ilDB->query($query);
316 if ($res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
317 return true;
318 }
319 return false;
320 }

References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.

◆ isMembershipOptional()

ilLDAPServer::isMembershipOptional ( )

Definition at line 718 of file class.ilLDAPServer.php.

718 : bool
719 {
721 }

References $group_optional.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ prepareFilter()

ilLDAPServer::prepareFilter ( string  $a_filter)
private

Create brackets for filters if they do not exist.

Definition at line 1076 of file class.ilLDAPServer.php.

1076 : string
1077 {
1078 $filter = trim($a_filter);
1079
1080 if ($filter === '') {
1081 return $filter;
1082 }
1083
1084 if (strpos($filter, '(') !== 0) {
1085 $filter = ('(' . $filter);
1086 }
1087 if (substr($filter, -1) !== ')') {
1088 $filter .= ')';
1089 }
1090 return $filter;
1091 }

References $filter.

Referenced by getFilter(), and getGroupFilter().

+ Here is the caller graph for this function:

◆ read()

ilLDAPServer::read ( )
private

Read server settings.

Definition at line 1115 of file class.ilLDAPServer.php.

1115 : void
1116 {
1117 if (!$this->server_id) {
1118 return;
1119 }
1120 $query = "SELECT * FROM ldap_server_settings WHERE server_id = " . $this->db->quote($this->server_id, ilDBConstants::T_INTEGER);
1121
1122 $res = $this->db->query($query);
1123 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1124 $this->toggleActive((bool) $row->active);
1125 $this->setName($row->name ?? '');
1126 $this->setUrl($row->url ?? '');
1127 $this->setVersion((int) $row->version);
1128 $this->setBaseDN($row->base_dn ?? '');
1129 $this->toggleReferrer((bool) $row->referrals);
1130 $this->toggleTLS((bool) $row->tls);
1131 $this->setBindingType((int) $row->bind_type);
1132 $this->setBindUser($row->bind_user ?? '');
1133 $this->setBindPassword($row->bind_pass ?? '');
1134 $this->setSearchBase($row->search_base ?? '');
1135 $this->setUserScope((int) $row->user_scope);
1136 $this->setUserAttribute($row->user_attribute ?? '');
1137 $this->setFilter($row->filter ?? '');
1138 $this->setGroupDN($row->group_dn ?? '');
1139 $this->setGroupScope((int) $row->group_scope);
1140 $this->setGroupFilter($row->group_filter ?? '');
1141 $this->setGroupMember($row->group_member ?? '');
1142 $this->setGroupAttribute($row->group_attribute ?? '');
1143 $this->toggleMembershipOptional((bool) $row->group_optional);
1144 $this->setGroupUserFilter($row->group_user_filter ?? '');
1145 $this->enableGroupMemberIsDN((bool) $row->group_memberisdn);
1146 $this->setGroupName($row->group_name ?? '');
1147 $this->enableSyncOnLogin((bool) $row->sync_on_login);
1148 $this->enableSyncPerCron((bool) $row->sync_per_cron);
1149 $this->enableRoleSynchronization((bool) $row->role_sync_active);
1150 $this->setRoleBindDN($row->role_bind_dn ?? '');
1151 $this->setRoleBindPassword($row->role_bind_pass ?? '');
1152 $this->enableAccountMigration((bool) $row->migration);
1153 $this->enableAuthentication((bool) $row->authentication);
1154 $this->setAuthenticationMapping((int) $row->authentication_type);
1155 $this->setUsernameFilter($row->username_filter ?? '');
1156 $this->enableEscapeDN((bool) $row->escape_dn);
1157 }
1158 }
enableRoleSynchronization(bool $a_value)
setGroupFilter(string $a_value)
setFilter(string $a_filter)
enableEscapeDN(bool $a_value)
toggleTLS(bool $a_status)
enableGroupMemberIsDN(bool $a_value)
enableSyncOnLogin(bool $a_value)
setGroupDN(string $a_value)
setGroupScope(int $a_value)
setRoleBindDN(string $a_value)
setGroupUserFilter(string $a_filter)
enableAuthentication(bool $a_status)
Enable authentication for this ldap server.
setUrl(string $a_url)
Set server URL(s).
setGroupAttribute(string $a_value)
setUsernameFilter(string $a_value)
setBindPassword(string $a_password)
setUserAttribute(string $a_user_attr)
setGroupName(string $a_value)
setBaseDN(string $a_base_dn)
enableSyncPerCron(bool $a_value)
enableAccountMigration(bool $a_status)
Enable account migration.
setGroupMember(string $a_value)
setBindUser(string $a_user)
setUserScope(int $a_value)
setBindingType(int $a_type)
toggleMembershipOptional(bool $a_status)
toggleReferrer(bool $a_status)
setAuthenticationMapping(int $a_map)
Set mapped authentication mapping.
toggleActive(bool $a_status)
setSearchBase(string $a_search_base)
setVersion(int $a_version)
setName(string $a_name)
setRoleBindPassword(string $a_value)

References $res, enableAccountMigration(), enableAuthentication(), enableEscapeDN(), enableGroupMemberIsDN(), enableRoleSynchronization(), enableSyncOnLogin(), enableSyncPerCron(), ilDBConstants\FETCHMODE_OBJECT, setAuthenticationMapping(), setBaseDN(), setBindingType(), setBindPassword(), setBindUser(), setFilter(), setGroupAttribute(), setGroupDN(), setGroupFilter(), setGroupMember(), setGroupName(), setGroupScope(), setGroupUserFilter(), setName(), setRoleBindDN(), setRoleBindPassword(), setSearchBase(), setUrl(), setUserAttribute(), setUsernameFilter(), setUserScope(), setVersion(), ilDBConstants\T_INTEGER, toggleActive(), toggleMembershipOptional(), toggleReferrer(), and toggleTLS().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rotateFallbacks()

ilLDAPServer::rotateFallbacks ( )

Rotate fallback urls in case of connect timeouts (move first to end and persist).

Definition at line 106 of file class.ilLDAPServer.php.

106 : bool
107 {
108 if ($this->url_list->count() < 2) {
109 return false;
110 }
111
112 $this->url_list = $this->url_list->rotate();
113
114 $query = 'UPDATE ldap_server_settings SET ' .
115 'url = ' . $this->db->quote($this->url_list->toString(), 'text') . ' ' .
116 'WHERE server_id = ' . $this->db->quote($this->getServerId(), 'integer');
117 $this->db->manipulate($query);
118
119 return true;
120 }

References getServerId().

Referenced by doConnectionCheck().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAuthenticationMapping()

ilLDAPServer::setAuthenticationMapping ( int  $a_map)

Set mapped authentication mapping.

Definition at line 458 of file class.ilLDAPServer.php.

458 : void
459 {
460 $this->authentication_mapping = $a_map;
461 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setBaseDN()

ilLDAPServer::setBaseDN ( string  $a_base_dn)

Definition at line 585 of file class.ilLDAPServer.php.

585 : void
586 {
587 $this->base_dn = $a_base_dn;
588 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setBindingType()

ilLDAPServer::setBindingType ( int  $a_type)

Definition at line 609 of file class.ilLDAPServer.php.

609 : void
610 {
611 if ($a_type === self::LDAP_BIND_USER) {
612 $this->binding_type = self::LDAP_BIND_USER;
613 } else {
614 $this->binding_type = self::LDAP_BIND_ANONYMOUS;
615 }
616 }

References LDAP_BIND_ANONYMOUS, and LDAP_BIND_USER.

Referenced by read().

+ Here is the caller graph for this function:

◆ setBindPassword()

ilLDAPServer::setBindPassword ( string  $a_password)

Definition at line 629 of file class.ilLDAPServer.php.

629 : void
630 {
631 $this->bind_password = $a_password;
632 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setBindUser()

ilLDAPServer::setBindUser ( string  $a_user)

Definition at line 621 of file class.ilLDAPServer.php.

621 : void
622 {
623 $this->bind_user = $a_user;
624 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setFilter()

ilLDAPServer::setFilter ( string  $a_filter)

Definition at line 653 of file class.ilLDAPServer.php.

653 : void
654 {
655 $this->filter = $a_filter;
656 }

References ILIAS\Repository\filter().

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGlobalRole()

ilLDAPServer::setGlobalRole ( int  $a_role)

Definition at line 771 of file class.ilLDAPServer.php.

771 : void
772 {
773 $this->global_role = $a_role;
774 }

◆ setGroupAttribute()

ilLDAPServer::setGroupAttribute ( string  $a_value)

Definition at line 710 of file class.ilLDAPServer.php.

710 : void
711 {
712 $this->group_attribute = $a_value;
713 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setGroupDN()

ilLDAPServer::setGroupDN ( string  $a_value)

Definition at line 661 of file class.ilLDAPServer.php.

661 : void
662 {
663 $this->group_dn = $a_value;
664 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setGroupFilter()

ilLDAPServer::setGroupFilter ( string  $a_value)

Definition at line 669 of file class.ilLDAPServer.php.

669 : void
670 {
671 $this->group_filter = $a_value;
672 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setGroupMember()

ilLDAPServer::setGroupMember ( string  $a_value)

Definition at line 677 of file class.ilLDAPServer.php.

677 : void
678 {
679 $this->group_member = $a_value;
680 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setGroupName()

ilLDAPServer::setGroupName ( string  $a_value)

Definition at line 685 of file class.ilLDAPServer.php.

685 : void
686 {
687 $this->group_name = $a_value;
688 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setGroupScope()

ilLDAPServer::setGroupScope ( int  $a_value)

Definition at line 739 of file class.ilLDAPServer.php.

739 : void
740 {
741 $this->group_scope = $a_value;
742 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setGroupUserFilter()

ilLDAPServer::setGroupUserFilter ( string  $a_filter)

Definition at line 722 of file class.ilLDAPServer.php.

722 : void
723 {
724 $this->group_user_filter = $a_filter;
725 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setName()

ilLDAPServer::setName ( string  $a_name)

Definition at line 569 of file class.ilLDAPServer.php.

569 : void
570 {
571 $this->name = $a_name;
572 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setRoleBindDN()

ilLDAPServer::setRoleBindDN ( string  $a_value)

Definition at line 779 of file class.ilLDAPServer.php.

779 : void
780 {
781 $this->role_bind_dn = $a_value;
782 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setRoleBindPassword()

ilLDAPServer::setRoleBindPassword ( string  $a_value)

Definition at line 787 of file class.ilLDAPServer.php.

787 : void
788 {
789 $this->role_bind_pass = $a_value;
790 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setSearchBase()

ilLDAPServer::setSearchBase ( string  $a_search_base)

Definition at line 637 of file class.ilLDAPServer.php.

637 : void
638 {
639 $this->search_base = $a_search_base;
640 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setUrl()

ilLDAPServer::setUrl ( string  $a_url)

Set server URL(s).

Pass empty string when URL column is NULL or empty.

Definition at line 499 of file class.ilLDAPServer.php.

499 : void
500 {
501 $this->url_list = \ILIAS\LDAP\Server\ServerUrlList::fromString($a_url);
502 }
static fromString(string $stored)
Create from string representation (comma-separated, as stored in DB or form).

References ILIAS\LDAP\Server\ServerUrlList\fromString().

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUserAttribute()

ilLDAPServer::setUserAttribute ( string  $a_user_attr)

Definition at line 645 of file class.ilLDAPServer.php.

645 : void
646 {
647 $this->user_attribute = $a_user_attr;
648 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setUsernameFilter()

ilLDAPServer::setUsernameFilter ( string  $a_value)

Definition at line 804 of file class.ilLDAPServer.php.

804 : void
805 {
806 $this->username_filter = $a_value;
807 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setUserScope()

ilLDAPServer::setUserScope ( int  $a_value)

Definition at line 747 of file class.ilLDAPServer.php.

747 : void
748 {
749 $this->user_scope = $a_value;
750 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setVersion()

ilLDAPServer::setVersion ( int  $a_version)

Definition at line 577 of file class.ilLDAPServer.php.

577 : void
578 {
579 $this->version = $a_version;
580 }

Referenced by read().

+ Here is the caller graph for this function:

◆ toggleActive()

ilLDAPServer::toggleActive ( bool  $a_status)

Definition at line 483 of file class.ilLDAPServer.php.

483 : void
484 {
485 $this->active = $a_status;
486 }

Referenced by read().

+ Here is the caller graph for this function:

◆ toggleDataSource()

static ilLDAPServer::toggleDataSource ( int  $a_ldap_server_id,
int  $a_auth_mode,
int  $a_status 
)
static

Toggle Data Source.

Todo:
handle multiple ldap servers

Definition at line 359 of file class.ilLDAPServer.php.

359 : bool
360 {
361 global $DIC;
362
363 $ilDB = $DIC['ilDB'];
364
366
367 if ($a_status) {
368 $query = "UPDATE ldap_server_settings " .
369 'SET authentication_type = ' . $ilDB->quote($a_auth_mode, 'integer') . " " .
370 'WHERE server_id = ' . $ilDB->quote($a_ldap_server_id, 'integer');
371 $ilDB->manipulate($query);
372 }
373 return true;
374 }
static disableDataSourceForAuthMode(int $a_authmode)
Disable data source.

References $DIC, $ilDB, and disableDataSourceForAuthMode().

+ Here is the call graph for this function:

◆ toggleMembershipOptional()

ilLDAPServer::toggleMembershipOptional ( bool  $a_status)

Definition at line 714 of file class.ilLDAPServer.php.

714 : void
715 {
716 $this->group_optional = $a_status;
717 }

Referenced by read().

+ Here is the caller graph for this function:

◆ toggleReferrer()

ilLDAPServer::toggleReferrer ( bool  $a_status)

Definition at line 593 of file class.ilLDAPServer.php.

593 : void
594 {
595 $this->referrals = $a_status;
596 }

Referenced by read().

+ Here is the caller graph for this function:

◆ toggleTLS()

ilLDAPServer::toggleTLS ( bool  $a_status)

Definition at line 601 of file class.ilLDAPServer.php.

601 : void
602 {
603 $this->tls = $a_status;
604 }

Referenced by read().

+ Here is the caller graph for this function:

◆ toPearAuthArray()

ilLDAPServer::toPearAuthArray ( )

Creates an array of options compatible to PEAR Auth.

Returns
array auth settings

Definition at line 1022 of file class.ilLDAPServer.php.

1022 : array
1023 {
1024 $options = array(
1025 'url' => $this->getUrl(),
1026 'version' => $this->getVersion(),
1027 'referrals' => $this->isActiveReferrer());
1028
1029 if ($this->getBindingType() === self::LDAP_BIND_USER) {
1030 $options['binddn'] = $this->getBindUser();
1031 $options['bindpw'] = $this->getBindPassword();
1032 }
1033 $options['basedn'] = $this->getBaseDN();
1034 $options['start_tls'] = $this->isActiveTLS();
1035 $options['userdn'] = $this->getSearchBase();
1036 if ($this->getUserScope() === self::LDAP_SCOPE_ONE) {
1037 $options['userscope'] = 'one';
1038 } else {
1039 $options['userscope'] = 'sub';
1040 }
1041
1042 $options['userattr'] = $this->getUserAttribute();
1043 $options['userfilter'] = $this->getFilter();
1044 $options['attributes'] = $this->getPearAtributeArray();
1045 $options['debug'] = self::DEBUG;
1046
1047
1048 $options['enableLogging'] = true;
1049
1050 switch ($this->getGroupScope()) {
1052 $options['groupscope'] = 'base';
1053 break;
1055 $options['groupscope'] = 'one';
1056 break;
1057 default:
1058 $options['groupscope'] = 'sub';
1059 break;
1060 }
1061 $options['escape_dn'] = $this->enabledEscapeDN();
1062 $options['groupdn'] = $this->getGroupDN();
1063 $options['groupattr'] = $this->getGroupAttribute();
1064 $options['groupfilter'] = $this->getGroupFilter();
1065 $options['memberattr'] = $this->getGroupMember();
1066 $options['memberisdn'] = $this->enabledGroupMemberIsDN();
1067 $options['group'] = $this->getGroupName();
1068
1069
1070 return $options;
1071 }
getPearAtributeArray()
Get attribute array for pear auth data.

References ILIAS\UI\Implementation\Component\Input\Field\$options, DEBUG, enabledEscapeDN(), enabledGroupMemberIsDN(), getBaseDN(), getBindingType(), getBindPassword(), getBindUser(), getFilter(), getGroupAttribute(), getGroupDN(), getGroupFilter(), getGroupMember(), getGroupName(), getGroupScope(), getPearAtributeArray(), getSearchBase(), getUrl(), getUserAttribute(), getUserScope(), getVersion(), isActiveReferrer(), isActiveTLS(), LDAP_SCOPE_BASE, and LDAP_SCOPE_ONE.

+ Here is the call graph for this function:

◆ update()

ilLDAPServer::update ( )

Definition at line 949 of file class.ilLDAPServer.php.

949 : bool
950 {
951 $query = "UPDATE ldap_server_settings SET " .
952 "active = " . $this->db->quote($this->isActive(), 'integer') . ", " .
953 "name = " . $this->db->quote($this->getName(), 'text') . ", " .
954 "url = " . $this->db->quote($this->getUrlString(), 'text') . ", " .
955 "version = " . $this->db->quote($this->getVersion(), 'integer') . ", " .
956 "base_dn = " . $this->db->quote($this->getBaseDN(), 'text') . ", " .
957 "referrals = " . $this->db->quote($this->isActiveReferrer(), 'integer') . ", " .
958 "tls = " . $this->db->quote($this->isActiveTLS(), 'integer') . ", " .
959 "bind_type = " . $this->db->quote($this->getBindingType(), 'integer') . ", " .
960 "bind_user = " . $this->db->quote($this->getBindUser(), 'text') . ", " .
961 "bind_pass = " . $this->db->quote($this->getBindPassword(), 'text') . ", " .
962 "search_base = " . $this->db->quote($this->getSearchBase(), 'text') . ", " .
963 "user_scope = " . $this->db->quote($this->getUserScope(), 'integer') . ", " .
964 "user_attribute = " . $this->db->quote($this->getUserAttribute(), 'text') . ", " .
965 "filter = " . $this->db->quote($this->getFilter(), 'text') . ", " .
966 "group_dn = " . $this->db->quote($this->getGroupDN(), 'text') . ", " .
967 "group_scope = " . $this->db->quote($this->getGroupScope(), 'integer') . ", " .
968 "group_filter = " . $this->db->quote($this->getGroupFilter(), 'text') . ", " .
969 "group_member = " . $this->db->quote($this->getGroupMember(), 'text') . ", " .
970 "group_memberisdn =" . $this->db->quote((int) $this->enabledGroupMemberIsDN(), 'integer') . ", " .
971 "group_name = " . $this->db->quote($this->getGroupName(), 'text') . ", " .
972 "group_attribute = " . $this->db->quote($this->getGroupAttribute(), 'text') . ", " .
973 "group_optional = " . $this->db->quote((int) $this->isMembershipOptional(), 'integer') . ", " .
974 "group_user_filter = " . $this->db->quote($this->getGroupUserFilter(), 'text') . ", " .
975 "sync_on_login = " . $this->db->quote(($this->enabledSyncOnLogin() ? 1 : 0), 'integer') . ", " .
976 "sync_per_cron = " . $this->db->quote(($this->enabledSyncPerCron() ? 1 : 0), 'integer') . ", " .
977 "role_sync_active = " . $this->db->quote($this->enabledRoleSynchronization(), 'integer') . ", " .
978 "role_bind_dn = " . $this->db->quote($this->getRoleBindDN(), 'text') . ", " .
979 "role_bind_pass = " . $this->db->quote($this->getRoleBindPassword(), 'text') . ", " .
980 "migration = " . $this->db->quote((int) $this->isAccountMigrationEnabled(), 'integer') . ", " .
981 'authentication = ' . $this->db->quote((int) $this->isAuthenticationEnabled(), 'integer') . ', ' .
982 'authentication_type = ' . $this->db->quote($this->getAuthenticationMapping(), 'integer') . ' ' .
983 ", username_filter = " . $this->db->quote($this->getUsernameFilter(), "text") . " " .
984 ", escape_dn = " . $this->db->quote($this->enabledEscapeDN() ? 1 : 0, 'integer') . " " .
985 "WHERE server_id = " . $this->db->quote($this->getServerId(), 'integer');
986
987 $this->db->manipulate($query);
988 return true;
989 }

References enabledEscapeDN(), enabledGroupMemberIsDN(), enabledRoleSynchronization(), enabledSyncOnLogin(), enabledSyncPerCron(), getAuthenticationMapping(), getBaseDN(), getBindingType(), getBindPassword(), getBindUser(), getFilter(), getGroupAttribute(), getGroupDN(), getGroupFilter(), getGroupMember(), getGroupName(), getGroupScope(), getGroupUserFilter(), getName(), getRoleBindDN(), getRoleBindPassword(), getSearchBase(), getServerId(), getUrlString(), getUserAttribute(), getUsernameFilter(), getUserScope(), getVersion(), isAccountMigrationEnabled(), isActive(), isActiveReferrer(), isActiveTLS(), isAuthenticationEnabled(), and isMembershipOptional().

+ Here is the call graph for this function:

◆ validate()

ilLDAPServer::validate ( )

Validate user input.

Definition at line 839 of file class.ilLDAPServer.php.

839 : bool
840 {
841 $this->ilErr->setMessage('');
842 if ($this->getName() === '' ||
843 $this->getBaseDN() === '' ||
844 $this->getUserAttribute() === '' ||
845 $this->url_list->count() === 0) {
846 $this->ilErr->setMessage($this->lng->txt('fill_out_all_required_fields'));
847 return false;
848 }
849
850 if (!empty($this->url_list->getInvalidParts())) {
851 $this->ilErr->setMessage($this->lng->txt('form_input_not_valid'));
852 return false;
853 }
854
855 if ($this->getBindingType() === self::LDAP_BIND_USER
856 && ($this->getBindUser() === '' || $this->getBindPassword() === '')) {
857 $this->ilErr->appendMessage($this->lng->txt('ldap_missing_bind_user'));
858 return false;
859 }
860
861 if (!$this->global_role && ($this->enabledSyncPerCron() || $this->enabledSyncOnLogin())) {
862 $this->ilErr->appendMessage($this->lng->txt('ldap_missing_role_assignment'));
863 return false;
864 }
865
866 if ($this->getVersion() === 2 && $this->isActiveTLS()) {
867 $this->ilErr->appendMessage($this->lng->txt('ldap_tls_conflict'));
868 return false;
869 }
870
871 return true;
872 }

References enabledSyncOnLogin(), enabledSyncPerCron(), getBaseDN(), getBindingType(), getBindPassword(), getBindUser(), getName(), getUserAttribute(), getVersion(), isActiveTLS(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Field Documentation

◆ $account_migration

bool ilLDAPServer::$account_migration = false
private

Definition at line 71 of file class.ilLDAPServer.php.

Referenced by isAccountMigrationEnabled().

◆ $active

bool ilLDAPServer::$active = false
private

Definition at line 46 of file class.ilLDAPServer.php.

Referenced by isActive().

◆ $authentication_mapping

int ilLDAPServer::$authentication_mapping = 0
private

Definition at line 43 of file class.ilLDAPServer.php.

Referenced by getAuthenticationMapping().

◆ $base_dn

string ilLDAPServer::$base_dn = ''
private

Definition at line 50 of file class.ilLDAPServer.php.

Referenced by getBaseDN().

◆ $bind_password

string ilLDAPServer::$bind_password = ''
private

Definition at line 55 of file class.ilLDAPServer.php.

Referenced by getBindPassword().

◆ $bind_user

string ilLDAPServer::$bind_user = ''
private

Definition at line 54 of file class.ilLDAPServer.php.

Referenced by getBindUser().

◆ $binding_type

int ilLDAPServer::$binding_type = self::LDAP_BIND_ANONYMOUS
private

Definition at line 53 of file class.ilLDAPServer.php.

Referenced by getBindingType().

◆ $db

ilDBInterface ilLDAPServer::$db
private

Definition at line 75 of file class.ilLDAPServer.php.

◆ $enabled_authentication

bool ilLDAPServer::$enabled_authentication = true
private

Definition at line 42 of file class.ilLDAPServer.php.

Referenced by isAuthenticationEnabled().

◆ $escape_dn

bool ilLDAPServer::$escape_dn = false
private

Definition at line 44 of file class.ilLDAPServer.php.

Referenced by enabledEscapeDN().

◆ $filter

string ilLDAPServer::$filter = ''
private

Definition at line 60 of file class.ilLDAPServer.php.

Referenced by prepareFilter().

◆ $global_role

int ilLDAPServer::$global_role = 0
private

Definition at line 73 of file class.ilLDAPServer.php.

◆ $group_attribute

string ilLDAPServer::$group_attribute = ''
private

Definition at line 66 of file class.ilLDAPServer.php.

Referenced by getGroupAttribute().

◆ $group_dn

string ilLDAPServer::$group_dn = ''
private

Definition at line 61 of file class.ilLDAPServer.php.

Referenced by getGroupDN().

◆ $group_filter

string ilLDAPServer::$group_filter = ''
private

Definition at line 59 of file class.ilLDAPServer.php.

◆ $group_member

string ilLDAPServer::$group_member = ''
private

Definition at line 62 of file class.ilLDAPServer.php.

Referenced by getGroupMember().

◆ $group_name

string ilLDAPServer::$group_name = ''
private

Definition at line 64 of file class.ilLDAPServer.php.

Referenced by getGroupName().

◆ $group_optional

bool ilLDAPServer::$group_optional = true
private

Definition at line 67 of file class.ilLDAPServer.php.

Referenced by isMembershipOptional().

◆ $group_scope

int ilLDAPServer::$group_scope = self::LDAP_SCOPE_ONE
private

Definition at line 63 of file class.ilLDAPServer.php.

Referenced by getGroupScope().

◆ $group_user_filter

string ilLDAPServer::$group_user_filter = ''
private

Definition at line 68 of file class.ilLDAPServer.php.

Referenced by getGroupUserFilter().

◆ $ilErr

ilErrorHandling ilLDAPServer::$ilErr
private

Definition at line 77 of file class.ilLDAPServer.php.

◆ $instances

array ilLDAPServer::$instances = []
staticprivate

Definition at line 23 of file class.ilLDAPServer.php.

◆ $lng

ilLanguage ilLDAPServer::$lng
private

Definition at line 76 of file class.ilLDAPServer.php.

◆ $logger

ilLogger ilLDAPServer::$logger
private

Definition at line 78 of file class.ilLDAPServer.php.

Referenced by isAuthModeLDAP().

◆ $memberisdn

bool ilLDAPServer::$memberisdn = false
private

Definition at line 65 of file class.ilLDAPServer.php.

Referenced by enabledGroupMemberIsDN().

◆ $name

string ilLDAPServer::$name = ''
private

Definition at line 48 of file class.ilLDAPServer.php.

Referenced by getName().

◆ $referrals

bool ilLDAPServer::$referrals = false
private

Definition at line 51 of file class.ilLDAPServer.php.

Referenced by isActiveReferrer().

◆ $role_bind_dn

string ilLDAPServer::$role_bind_dn = ''
private

Definition at line 36 of file class.ilLDAPServer.php.

Referenced by getRoleBindDN().

◆ $role_bind_pass

string ilLDAPServer::$role_bind_pass = ''
private

Definition at line 37 of file class.ilLDAPServer.php.

Referenced by getRoleBindPassword().

◆ $role_sync_active

bool ilLDAPServer::$role_sync_active = false
private

Definition at line 38 of file class.ilLDAPServer.php.

Referenced by enabledRoleSynchronization().

◆ $search_base

string ilLDAPServer::$search_base = ''
private

Definition at line 56 of file class.ilLDAPServer.php.

Referenced by getSearchBase().

◆ $server_id

int ilLDAPServer::$server_id
private

Definition at line 40 of file class.ilLDAPServer.php.

Referenced by getServerId().

◆ $sync_on_login

bool ilLDAPServer::$sync_on_login = false
private

Definition at line 69 of file class.ilLDAPServer.php.

Referenced by enabledSyncOnLogin().

◆ $sync_per_cron

bool ilLDAPServer::$sync_per_cron = false
private

Definition at line 70 of file class.ilLDAPServer.php.

Referenced by enabledSyncPerCron().

◆ $tls

bool ilLDAPServer::$tls = false
private

Definition at line 52 of file class.ilLDAPServer.php.

Referenced by isActiveTLS().

◆ $url_list

ILIAS LDAP Server ServerUrlList ilLDAPServer::$url_list
private

Definition at line 41 of file class.ilLDAPServer.php.

◆ $user_attribute

string ilLDAPServer::$user_attribute = ''
private

Definition at line 57 of file class.ilLDAPServer.php.

Referenced by getUserAttribute().

◆ $user_scope

int ilLDAPServer::$user_scope = self::LDAP_SCOPE_ONE
private

Definition at line 58 of file class.ilLDAPServer.php.

Referenced by getUserScope().

◆ $username_filter

string ilLDAPServer::$username_filter = ''
private

Definition at line 72 of file class.ilLDAPServer.php.

Referenced by getUsernameFilter().

◆ $version

int ilLDAPServer::$version = self::DEFAULT_VERSION
private

Definition at line 49 of file class.ilLDAPServer.php.

Referenced by getVersion().

◆ DEBUG

const ilLDAPServer::DEBUG = false
private

Definition at line 32 of file class.ilLDAPServer.php.

Referenced by toPearAuthArray().

◆ DEFAULT_NETWORK_TIMEOUT

const ilLDAPServer::DEFAULT_NETWORK_TIMEOUT = 5

Definition at line 34 of file class.ilLDAPServer.php.

Referenced by ilLDAPQuery\bind().

◆ DEFAULT_VERSION

const ilLDAPServer::DEFAULT_VERSION = 3
private

Definition at line 33 of file class.ilLDAPServer.php.

◆ LDAP_BIND_ANONYMOUS

const ilLDAPServer::LDAP_BIND_ANONYMOUS = 0

Definition at line 25 of file class.ilLDAPServer.php.

Referenced by ilLDAPSettingsGUI\initForm(), and setBindingType().

◆ LDAP_BIND_USER

const ilLDAPServer::LDAP_BIND_USER = 1

◆ LDAP_SCOPE_BASE

const ilLDAPServer::LDAP_SCOPE_BASE = 2

◆ LDAP_SCOPE_ONE

const ilLDAPServer::LDAP_SCOPE_ONE = 1

◆ LDAP_SCOPE_SUB

const ilLDAPServer::LDAP_SCOPE_SUB = 0

Definition at line 28 of file class.ilLDAPServer.php.

Referenced by ilLDAPSettingsGUI\initForm(), and ilLDAPQuery\queryByScope().


The documentation for this class was generated from the following file: