17 private const DEFAULT_IDP_LIST =
"urn:mace:organization1:providerID, Example Organization 1\nurn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/SWITCHaai";
41 'institution' =>
false,
42 'department' =>
false,
47 'phone_office' =>
false,
48 'phone_home' =>
false,
49 'phone_mobile' =>
false,
51 'matriculation' =>
false,
70 public function read(): void
72 $filtered_data = array_filter(
74 static fn($value,
string $key):
bool => str_starts_with($key, self::PREFIX),
78 array_walk($filtered_data,
function ($v,
string $k):
void {
79 $this->data[str_replace(self::PREFIX,
'', $k)] = $v ===
'' ?
null : $v;
83 public function get(
string $a_keyword, ?
string $a_default_value =
null):
string 85 $a_keyword = str_replace(self::PREFIX,
'', $a_keyword);
87 return (
string) ($this->data[$a_keyword] ?? $a_default_value);
95 public function set(
string $a_key,
string $a_val):
void 97 $a_key = str_replace(self::PREFIX,
'', $a_key);
98 $this->data[$a_key] = $a_val;
103 foreach ($this->data as $key => $value) {
104 $this->
settings->set(self::PREFIX . $key, (
string) $value);
110 return $this->data[
'user_default_role'] ?? 4;
115 $this->data[
'user_default_role'] = $role_id;
120 return $this->data[
'idp_list'] ?? self::DEFAULT_IDP_LIST;
125 $this->data[
'idp_list'] = $list;
130 return $this->data[
'login_button'] ?? self::DEFAULT_LOGIN_BUTTON;
135 $this->data[
'login_button'] = $login_button;
140 return $this->data[
'hos_type'] ?? self::DEFAULT_ORGANISATION_SELECTION;
145 $this->data[
'hos_type'] = $type;
150 return (
bool) ($this->data[
'active'] ??
false);
155 $this->data[
'active'] = $status;
160 return (
bool) ($this->data[
'auth_allow_local'] ??
false);
165 $this->data[
'auth_allow_local'] = $status;
170 return $this->data[
'account_creation'] ?? self::ACCOUNT_CREATION_ENABLED;
175 $this->data[
'account_creation'] = $value;
180 return ($this->data[
'federation_name'] ??
'');
185 $this->data[
'federation_name'] = $federation;
setOrganisationSelectionType(string $type)
const ACCOUNT_CREATION_WITH_APPROVAL
const ACCOUNT_CREATION_DISABLED
const DEFAULT_LOGIN_BUTTON
getOrganisationSelectionType()
const DEFAULT_ORGANISATION_SELECTION
setAccountCreation(string $value)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const ACCOUNT_CREATION_ENABLED
setFederationName(string $federation)
setAllowLocalAuth(bool $status)
setLoginButton(string $login_button)
Class ilShibbolethSettings.
setDefaultRole(int $role_id)