24 include_once(
'Auth/Container/RADIUS.php');
58 #$_POST['username'] = utf8_decode($_POST['username']);
59 #$_POST['password'] = utf8_decode($_POST['password']);
60 $this->log->write(__METHOD__.
': Decoded username and password to latin1.');
83 $this->force_creation =
true;
94 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
100 $user_data = array_change_key_case($a_auth->getAuthData(),CASE_LOWER);
103 if(!$user_data[
'ilInternalAccount'])
105 if($this->radius_settings->enabledCreation())
111 $_SESSION[
'tmp_external_account'] = $a_username;
113 $_SESSION[
'tmp_roles'] = array(0 => $this->radius_settings->getDefaultRole());
115 ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmd=showAccountMigration&cmdClass=ilstartupgui');
118 $new_name = $this->radius_user->create($a_username);
119 $a_auth->setAuth($new_name);
133 $a_auth->setAuth($user_data[
'ilInternalAccount']);
144 include_once
'Services/Radius/classes/class.ilRadiusSettings.php';
157 include_once(
'Services/Radius/classes/class.ilRadiusAttributeToUser.php');
168 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
173 $GLOBALS[
'ilLog']->write(__METHOD__.
'Using ldap data source');
175 include_once
'./Services/LDAP/classes/class.ilLDAPUserSynchronisation.php';
178 $sync->setUserData(array());
179 $sync->forceCreation($this->force_creation);
182 $internal_account = $sync->sync();
184 catch(UnexpectedValueException $e) {
185 $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
192 $GLOBALS[
'ilLog']->write(__METHOD__.
': Login failed with message: '. $e->getMessage());
198 $GLOBALS[
'ilLog']->write(__METHOD__.
': Starting account migration.');
200 ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&cmd=showAccountMigration');
203 $a_auth->setAuth($internal_account);