27 private const DEFAULT_IDP_LIST =
"urn:mace:organization1:providerID, Example Organization 1\nurn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/SWITCHaai";
45 'institution' =>
false,
46 'department' =>
false,
51 'phone_office' =>
false,
52 'phone_home' =>
false,
53 'phone_mobile' =>
false,
55 'matriculation' =>
false,
74 public function read(): void
76 $filtered_data = array_filter(
78 static fn($value,
string $key):
bool => str_starts_with($key, self::PREFIX),
82 array_walk($filtered_data,
function ($v,
string $k):
void {
83 $this->data[str_replace(self::PREFIX,
'', $k)] = $v ===
'' ? null : $v;
87 public function get(
string $a_keyword, ?
string $a_default_value = null):
string 89 $a_keyword = str_replace(self::PREFIX,
'', $a_keyword);
91 return (
string) ($this->data[$a_keyword] ?? $a_default_value);
99 public function set(
string $a_key,
string $a_val):
void 101 $a_key = str_replace(self::PREFIX,
'', $a_key);
102 $this->data[$a_key] = $a_val;
107 foreach ($this->data as $key => $value) {
108 $this->
settings->set(self::PREFIX . $key, (
string) $value);
114 return $this->data[
'user_default_role'] ?? 4;
119 $this->data[
'user_default_role'] = $role_id;
124 return $this->data[
'idp_list'] ?? self::DEFAULT_IDP_LIST;
129 $this->data[
'idp_list'] = $list;
134 return $this->data[
'login_button'] ?? self::DEFAULT_LOGIN_BUTTON;
139 $this->data[
'login_button'] = $login_button;
144 return $this->data[
'hos_type'] ?? self::DEFAULT_ORGANISATION_SELECTION;
149 $this->data[
'hos_type'] = $type;
154 return (
bool) ($this->data[
'active'] ??
false);
159 $this->data[
'active'] = $status;
164 return (
bool) ($this->data[
'auth_allow_local'] ??
false);
169 $this->data[
'auth_allow_local'] = $status;
174 return $this->data[
'account_creation'] ?? self::ACCOUNT_CREATION_ENABLED;
179 $this->data[
'account_creation'] = $value;
184 return ($this->data[
'federation_name'] ??
'');
189 $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)
const ACCOUNT_CREATION_ENABLED
setFederationName(string $federation)
setAllowLocalAuth(bool $status)
setLoginButton(string $login_button)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDefaultRole(int $role_id)