100 $this->
logger->debug(sprintf(
101 'Login observer called for SOAP authentication request of ext_account "%s" and auth_mode "%s".',
105 $this->
logger->debug(sprintf(
106 'Trying to find ext_account "%s" for auth_mode "%s".',
117 if (
'' === $internalLogin ||
null === $internalLogin) {
123 if ($this->use_dot_net) {
124 $soapAction = $this->server_nms .
'/isValidSession';
133 $nspref .
'new_user' => $isNewUser
140 $valid = [
'valid' =>
false];
143 if (
$valid[
'valid'] !==
true) {
157 if (!$this->
settings->get(
'soap_auth_create_users')) {
167 $usrData[
'firstname'] =
$valid[
'firstname'];
168 $usrData[
'lastname'] =
$valid[
'lastname'];
169 $usrData[
'email'] =
$valid[
'email'];
170 $usrData[
'login'] = $internalLogin;
171 $usrData[
'passwd'] =
'';
175 if ($this->
settings->get(
'soap_auth_allow_local')) {
177 $password = $passwords[0];
178 $usrData[
'passwd'] = $password;
182 $usrData[
'auth_mode'] =
'soap';
184 $usrData[
'profile_incomplete'] = 1;
186 $userObj->assignData($usrData);
187 $userObj->setTitle($userObj->getFullname());
188 $userObj->setDescription($userObj->getEmail());
189 $userObj->setLanguage($this->
language->getDefaultLanguage());
192 $userObj->setTimeLimitUnlimited(
true);
193 $userObj->setTimeLimitFrom(time());
194 $userObj->setTimeLimitUntil(time());
195 $userObj->setOwner(0);
197 $userObj->setActive(
true);
198 $userObj->updateOwner();
199 $userObj->saveAsNew();
200 $userObj->writePrefs();
202 $this->rbacAdmin->assignUser(
203 (
int) $this->
settings->get(
'soap_auth_user_default_role',
'4'),
207 if ($this->
settings->get(
'soap_auth_account_mail',
'0')) {
209 $registrationSettings->setPasswordGenerationStatus(
true);
212 $registrationSettings,
217 ->withDirectRegistrationMode()
218 ->send($userObj, $password,
false);
static _generateLogin(string $a_login)
generate free login by starting with a default string and adding postfix numbers
static _lookupId($a_user_str)
static _checkExternalAuthAccount(string $a_auth, string $a_account, bool $tryFallback=true)
check whether external account and authentication method matches with a user
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Class ilAccountRegistrationMail.
static generatePasswords(int $a_number)
Generate a number of passwords.
Class ilObjAuthSettingsGUI.
client()
description: > This example shows how a Progress Bar can be rendered and used on the client...
setTranslatedReason(string $a_reason)
Set translated reason.
setReason(string $a_reason)
Set reason.
setAuthenticatedUserId(int $a_id)
language()
description: > Example for rendring a language glyph.