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);
110 elseif (
$res ==
true)
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();
182 $user_data = array_change_key_case($a_auth->getAuthData(),CASE_LOWER);
186 include_once
'./Services/LDAP/classes/class.ilLDAPUserSynchronisation.php';
189 $sync->setUserData($user_data);
190 $sync->forceCreation(self::$force_creation);
193 $internal_account = $sync->sync();
195 catch(UnexpectedValueException $e) {
196 $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
203 $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
209 $GLOBALS[
'ilLog']->write(__METHOD__.
': Starting account migration.');
211 ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&cmd=showAccountMigration');
214 $a_auth->setAuth($internal_account);
225 include_once(
'Services/LDAP/classes/class.ilLDAPAttributeToUser.php');
246 $a_username = isset($a_user_data[strtolower($this->server->getUserAttribute())]) ?
247 $a_user_data[strtolower($this->server->getUserAttribute())] :
251 if(!is_array($a_username))
255 foreach($a_username as $name)
264 return $a_username[0];
276 #$GLOBALS['ilLog']->write(__METHOD__.': Required 1');
280 include_once
'./Services/LDAP/classes/class.ilLDAPAttributeMapping.php';
283 #$GLOBALS['ilLog']->write(__METHOD__.': Required 2');
286 include_once
'./Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php';
289 #$GLOBALS['ilLog']->write(__METHOD__.': Required 3');