Skip to content
Snippets Groups Projects
Commit 7e476d97 authored by André Noack's avatar André Noack Committed by Jan-Hendrik Willms
Browse files

Resolve #3595 "ILIAS-Schnittstelle: Anlegen von neuen Nutzern schlägt fehl mit Ilias 8"

Closes #3595

Merge request studip/studip!2486
parent f22f4ec0
No related branches found
No related tags found
No related merge requests found
......@@ -359,7 +359,6 @@ class ConnectedIlias
} else {
$role_id = 4;
}
$this->soap_client->setCachingStatus(false);
$this->soap_client->clearCache();
$user_id = $this->soap_client->addUser($user_data, $role_id);
......@@ -1046,17 +1045,19 @@ class ConnectedIlias
*/
public function checkUser()
{
$user_exists = $this->soap_client->getUser($this->user->getId());
if (!is_array($user_exists)) {
$admin_user_id = $this->soap_client->lookupUser($this->ilias_config['admin']);
$admin_user_exists = $this->soap_client->getUser($admin_user_id);
if (is_array($admin_user_exists)) {
$this->user->unsetConnection(true);
if ($this->newUser()) {
PageLayout::postSuccess(_("Neue Verknüpfung zu ILIAS-User angelegt."));
if ($this->user->getId()) {
$user_exists = $this->soap_client->getUser($this->user->getId());
if (!is_array($user_exists)) {
$admin_user_id = $this->soap_client->lookupUser($this->ilias_config['admin']);
$admin_user_exists = $this->soap_client->getUser($admin_user_id);
if (is_array($admin_user_exists)) {
$this->user->unsetConnection(true);
if ($this->newUser()) {
PageLayout::postSuccess(_("Neue Verknüpfung zu ILIAS-User angelegt."));
}
}
}
} else return true;
} else return true;
}
return false;
}
......
......@@ -1030,7 +1030,7 @@ class IliasSoap extends StudipSoapClient
$update = $user_data["id"];
$usr_xml = "<Users>
<User".($update ? ' Id="'.$user_data["id"].'"' : '')." Action=".($update ? '"Update"' : '"Insert"').">
<User ".($update ? 'Id="'.$user_data["id"].'"' : 'Id=""')." Action=".($update ? '"Update"' : '"Insert"').">
<UDFDefinitions></UDFDefinitions>
<Login>".$user_data["login"]."</Login>
<Password Type=\"PLAIN\">".$user_data["passwd"]."</Password>
......@@ -1062,7 +1062,7 @@ class IliasSoap extends StudipSoapClient
'sid' => $this->getSID(),
'folder_id' => -1,
'usr_xml' => $usr_xml,
'conflict_role' => 1,
'conflict_rule' => 1,
'send_account_mail' => 0
];
$result = $this->call('importUsers', $param);
......
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