31 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 => strpos($key, self::PREFIX) === 0,
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);
103 public function set(
string $a_key,
string $a_val):
void 105 $a_key = str_replace(self::PREFIX,
'', $a_key);
106 $this->data[$a_key] = $a_val;
111 foreach ($this->data as
$key => $value) {
112 $this->
settings->set(self::PREFIX .
$key, (
string) $value);
118 return $this->data[
'user_default_role'] ?? 4;
123 $this->data[
'user_default_role'] = $role_id;
128 return $this->data[
'idp_list'] ?? self::DEFAULT_IDP_LIST;
133 $this->data[
'idp_list'] = $list;
138 return $this->data[
'login_button'] ?? self::DEFAULT_LOGIN_BUTTON;
143 $this->data[
'login_button'] = $login_button;
148 return $this->data[
'hos_type'] ?? self::DEFAULT_ORGANISATION_SELECTION;
153 $this->data[
'hos_type'] = $type;
158 return (
bool) ($this->data[
'active'] ??
false);
163 $this->data[
'active'] = $status ?
'1' :
'0';
168 return (
bool) ($this->data[
'auth_allow_local'] ??
false);
173 $this->data[
'auth_allow_local'] = $status ?
'1' :
'0';
178 return (
bool) ($this->data[
'activate_new'] ??
false);
183 $this->data[
'activate_new'] = $status ?
'1' :
'0';
188 return ($this->data[
'federation_name'] ??
'');
193 $this->data[
'federation_name'] = $federation;
setOrganisationSelectionType(string $type)
setAdminMustActivate(bool $status)
const DEFAULT_LOGIN_BUTTON
getOrganisationSelectionType()
const DEFAULT_ORGANISATION_SELECTION
setFederationName(string $federation)
setAllowLocalAuth(bool $status)
setLoginButton(string $login_button)
Class ilShibbolethSettings.
setDefaultRole(int $role_id)