24 include_once
'Auth/Container/LDAP.php';
58 include_once
'Services/LDAP/classes/class.ilLDAPServer.php';
60 $this->server->doConnectionCheck();
68 self::$force_creation = $a_status;
80 $this->optional_check =
true;
107 $this->
log(
'Container '.
$key.
': '.
$res->getMessage(), AUTH_LOG_ERR);
134 $this->
log->write(__METHOD__.
': checking group restrictions...');
137 $groups = $this->server->getGroupNames();
141 $this->
log->write(__METHOD__.
': No group restrictions found.');
146 $this->
log->write(__METHOD__.
': Group membership is optional.');
150 foreach($groups as $group)
152 $this->options[
'group'] = $group;
154 if(parent::checkGroup($a_name))
170 $this->options[
'userfilter'] = $this->server->getGroupUserFilter();
183 $ilBench->start(
'Auth',
'LDAPLoginObserver');
184 $user_data = array_change_key_case($a_auth->getAuthData(),CASE_LOWER);
189 $users[$a_username] = $user_data;
191 if($this->server->enabledSyncOnLogin())
193 if(!$user_data[
'ilInternalAccount'] and
194 $this->server->isAccountMigrationEnabled() and
199 $_SESSION[
'tmp_external_account'] = $a_username;
202 include_once(
'./Services/LDAP/classes/class.ilLDAPRoleAssignmentRules.php');
205 foreach($roles as $info)
212 $ilBench->stop(
'Auth',
'LDAPLoginObserver');
213 ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&cmd=showAccountMigration');
217 $ilBench->start(
'Auth',
'LDAPUserSynchronization');
220 #$GLOBALS['ilLog']->write(__METHOD__.': Starting update');
222 $this->ldap_attr_to_user->setUserData($users);
223 $this->ldap_attr_to_user->refresh();
231 $ilBench->stop(
'Auth',
'LDAPUserSynchronization');
234 if(!$user_data[
'ilInternalAccount'])
239 $ilBench->stop(
'Auth',
'LDAPLoginObserver');
244 $a_auth->setAuth($user_data[
'ilInternalAccount']);
245 $ilBench->stop(
'Auth',
'LDAPLoginObserver');
257 include_once(
'Services/LDAP/classes/class.ilLDAPAttributeToUser.php');
278 $a_username = isset($a_user_data[strtolower($this->server->getUserAttribute())]) ?
279 $a_user_data[strtolower($this->server->getUserAttribute())] :
283 if(!is_array($a_username))
287 foreach($a_username as
$name)
296 return $a_username[0];
308 #$GLOBALS['ilLog']->write(__METHOD__.': Required 1');
312 include_once
'./Services/LDAP/classes/class.ilLDAPAttributeMapping.php';
315 #$GLOBALS['ilLog']->write(__METHOD__.': Required 2');
318 include_once
'./Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php';
321 #$GLOBALS['ilLog']->write(__METHOD__.': Required 3');