Called after login and successful call of fetch data.
153 $GLOBALS[
'ilLog']->write(__METHOD__.
': SOAP login observer called');
176 $local_user = $this->response[
"local_user"];
177 if ($local_user !=
"")
180 $a_auth->setAuth($local_user);
183 if(!$ilSetting->get(
"soap_auth_create_users"))
191 if ($this->response[
"email"] !=
"")
200 if (
$_POST[
"LoginMappedUser"] !=
"")
202 if (count($email_user) > 0)
205 require_once
'Services/User/classes/class.ilUserPasswordManager.php';
214 $a_auth->status =
'';
215 $a_auth->setAuth($local_user);
230 if (count($email_user) > 0 &&
$_POST[
"CreateUser"] ==
"")
232 $_GET[
"email"] = $this->response[
"email"];
242 $newUser[
"firstname"] = $this->response[
"firstname"];
243 $newUser[
"lastname"] = $this->response[
"lastname"];
244 $newUser[
"email"] = $this->response[
"email"];
246 $newUser[
"login"] = $local_user;
249 $newUser[
"passwd"] =
"";
256 if ($ilSetting->get(
"soap_auth_allow_local") &&
257 $ilSetting->get(
"soap_auth_account_mail"))
261 $newUser[
"passwd"] = $pw;
266 $newUser[
"auth_mode"] =
"soap";
267 $newUser[
"ext_account"] = $a_username;
268 $newUser[
"profile_incomplete"] = 1;
271 $userObj->assignData($newUser);
272 $userObj->setTitle($userObj->getFullname());
273 $userObj->setDescription($userObj->getEmail());
276 $userObj->setLanguage($lng->lang_default);
279 $userObj->setTimeLimitOwner(7);
280 $userObj->setTimeLimitUnlimited(1);
281 $userObj->setTimeLimitFrom(time());
282 $userObj->setTimeLimitUntil(time());
285 $userObj->setOwner(0);
287 $userObj->setActive(1);
289 $userObj->updateOwner();
292 $userObj->saveAsNew(
false);
295 $userObj->writePrefs();
298 $rbacadmin->assignUser($ilSetting->get(
'soap_auth_user_default_role'), $userObj->getId(),
true);
301 if ($ilSetting->get(
"soap_auth_account_mail"))
303 include_once(
'./Services/User/classes/class.ilObjUserFolder.php');
305 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"")
307 include_once(
"Services/Mail/classes/class.ilAccountMail.php");
312 $acc_mail->setUserPassword($pw);
314 $acc_mail->setUser($userObj);
320 $a_auth->setAuth($local_user);
_getLocalAccountsForEmail($a_email)
check whether external account and authentication method matches with a user
static generatePasswords($a_number)
Generate a number of passwords.
_lookupNewAccountMail($a_lang)
const AUTH_SOAP_NO_ILIAS_USER
_generateLogin($a_login)
generate free login by starting with a default string and adding postfix numbers
_lookupLogin($a_user_id)
lookup login
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
const AUTH_SOAP_NO_ILIAS_USER_BUT_EMAIL
_writeExternalAccount($a_usr_id, $a_ext_id)
verifyPassword($password1, $password2, $cryptType="md5")
Crypt and verfiy the entered password.
_writeAuthMode($a_usr_id, $a_auth_mode)
const AUTH_WRONG_LOGIN
Returned if container is unable to authenticate user/password pair.
static getInstance()
Single method to reduce footprint (included files, created instances)