18declare(strict_types=1);
50 $this->setting =
$DIC->settings();
52 $this->source = $a_data;
53 if (is_object($a_data)) {
55 } elseif (is_array($a_data)) {
119 $this->
login = $this->source->getLogin();
120 $this->firstname = $this->source->getFirstname();
121 $this->lastname = $this->source->getLastname();
122 $this->email = $this->source->getEmail();
123 $this->institution = $this->source->getInstitution();
124 if ($this->source instanceof
ilObjUser) {
125 $this->external_account = $this->source->getExternalAccount();
126 $this->auth_mode = $this->source->getAuthMode();
128 $this->uid_hash =
'il_' . $this->setting->get(
'inst_id',
"0") .
'_usr_' . $this->source->getId();
143 if ($this->source[
'ecs_uid_hash']) {
145 } elseif ($this->source[
'ecs_uid']) {
152 return urlencode(json_encode($this, JSON_THROW_ON_ERROR));
161 $external_account_info =
'';
164 $external_auth_modes =
$setting->getOutgoingExternalAuthModes();
165 if (in_array($this->auth_mode, $external_auth_modes)) {
166 $placeholder =
$setting->getOutgoingUsernamePlaceholderByAuthMode($this->auth_mode);
181 $external_account_info =
'&ecs_external_account=1';
185 return '&ecs_login=' . urlencode((
string)
$login) .
186 '&ecs_firstname=' . urlencode($this->firstname) .
187 '&ecs_lastname=' . urlencode($this->lastname) .
188 '&ecs_email=' . urlencode($this->email) .
189 '&ecs_institution=' . urlencode($this->institution) .
190 '&ecs_uid_hash=' . urlencode($this->uid_hash) .
191 $external_account_info;
const EXTERNAL_ACCOUNT_PLACEHOLDER
Stores relevant user data.
loadFromObject()
load from object
getFirstname()
get firstname
loadFromGET()
load user data from GET parameters
toGET(ilECSParticipantSetting $setting)
get GET parameter string
toREALM()
Concatenate all attributes to one string.
getInstitution()
get institution
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")