Skip to content
Snippets Groups Projects
Commit da0110d5 authored by André Noack's avatar André Noack
Browse files

Resolve #3681 "ILIAS-Schnittstelle: Konfigurationsoption...

Resolve #3681 "ILIAS-Schnittstelle:  Konfigurationsoption "Authentifizierungsplugin übernehmen" hat keine Auswirkungen"

Closes #3681

Merge request studip/studip!2554
parent ea4b1fe2
No related branches found
No related tags found
No related merge requests found
...@@ -325,7 +325,6 @@ class ConnectedIlias ...@@ -325,7 +325,6 @@ class ConnectedIlias
} }
$user_data = $this->user->getUserArray(); $user_data = $this->user->getUserArray();
$user_data["login"] = $this->ilias_config['user_prefix'].$user_data["login"]; $user_data["login"] = $this->ilias_config['user_prefix'].$user_data["login"];
$user_data['auth_mode'] = 'default';
$user_exists = $this->soap_client->lookupUser($user_data["login"]); $user_exists = $this->soap_client->lookupUser($user_data["login"]);
//automatische Zuordnung von bestehenden Ilias Accounts //automatische Zuordnung von bestehenden Ilias Accounts
...@@ -351,10 +350,18 @@ class ConnectedIlias ...@@ -351,10 +350,18 @@ class ConnectedIlias
($this->user->auth_plugin != 'standard') && ($this->user->auth_plugin != 'standard') &&
($this->user->auth_plugin == $this->ilias_config['ldap_enable'])) { ($this->user->auth_plugin == $this->ilias_config['ldap_enable'])) {
$user_data['external_account'] = $this->user->studip_login; $user_data['external_account'] = $this->user->studip_login;
$auth_plugin = StudipAuthAbstract::getInstance($this->user->auth_plugin);
if ($auth_plugin instanceof StudipAuthLdap) {
$user_data['auth_mode'] = 'ldap';
} elseif ($auth_plugin instanceof StudipAuthCAS) {
$user_data['auth_mode'] = 'cas';
} elseif ($auth_plugin instanceof StudipAuthShib) {
$user_data['auth_mode'] = 'shibboleth';
}
} }
// set role according to Stud.IP perm // set role according to Stud.IP perm
if ($GLOBALS['auth']->auth['perm'] === 'root') { if (User::findCurrent()->perms === 'root') {
$role_id = 2; $role_id = 2;
} else { } else {
$role_id = 4; $role_id = 4;
...@@ -405,7 +412,6 @@ class ConnectedIlias ...@@ -405,7 +412,6 @@ class ConnectedIlias
if ($update_user->isConnected() && $update_user->id && $this->soap_client->lookupUser($update_user->login)) { if ($update_user->isConnected() && $update_user->id && $this->soap_client->lookupUser($update_user->login)) {
$user_data = $update_user->getUserArray(); $user_data = $update_user->getUserArray();
$user_data["login"] = $this->ilias_config['user_prefix'].$user_data["login"]; $user_data["login"] = $this->ilias_config['user_prefix'].$user_data["login"];
$user_data['auth_mode'] = 'default';
// set role according to Stud.IP perm // set role according to Stud.IP perm
if ($user->perms == "root") { if ($user->perms == "root") {
......
...@@ -169,22 +169,24 @@ class IliasUser ...@@ -169,22 +169,24 @@ class IliasUser
function getUserArray() function getUserArray()
{ {
// data for user-account in ILIAS // data for user-account in ILIAS
$user_data["id"] = $this->id; $user_data['id'] = $this->id;
$user_data["login"] = $this->studip_login; $user_data['login'] = $this->studip_login;
$user_data["passwd"] = $this->external_password; $user_data['passwd'] = $this->external_password;
$user_data["firstname"] = $this->firstname; $user_data['firstname'] = $this->firstname;
$user_data["lastname"] = $this->lastname; $user_data['lastname'] = $this->lastname;
$user_data["title"] = $this->title; $user_data['title'] = $this->title;
$user_data["gender"] = $this->gender; $user_data['gender'] = $this->gender;
$user_data["email"] = $this->email; $user_data['email'] = $this->email;
$user_data["street"] = $this->street; $user_data['street'] = $this->street;
$user_data["phone_home"] = $this->phone_home; $user_data['phone_home'] = $this->phone_home;
$user_data["matriculation"] = $this->matriculation; $user_data['matriculation'] = $this->matriculation;
$user_data["time_limit_unlimited"] = 1; $user_data['time_limit_unlimited'] = 1;
$user_data["active"] = 1; $user_data['active'] = 1;
$user_data["approve_date"] = date('Y-m-d H:i:s'); $user_data['approve_date'] = date('Y-m-d H:i:s');
$user_data["accepted_agreement"] = true; $user_data['accepted_agreement'] = true;
$user_data["agree_date"] = date('Y-m-d H:i:s'); $user_data['agree_date'] = date('Y-m-d H:i:s');
$user_data['auth_mode'] = 'default';
$user_data['external_account'] = '';
return $user_data; return $user_data;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment