19declare(strict_types=1);
72 $this->registration_type = $a_type;
82 if ($ret < 1 || $ret > 5) {
121 $this->password_generation_enabled = $a_status;
131 $this->access_limitation = $a_access_limitation;
136 $this->approve_recipient_logins = $a_rec_string;
137 $this->approve_recipient_ids = [];
140 foreach (explode(
',', trim($this->approve_recipient_logins)) as $login) {
142 $this->approve_recipient_ids[] = $uid;
159 return implode(
',', $this->unknown);
174 $this->role_type = $a_type;
179 $this->reg_hash_life_time = $a_lifetime;
185 return max($this->reg_hash_life_time, self::REG_HASH_LIFETIME_MIN_VALUE);
190 $this->reg_allow_codes = $a_allow_codes;
202 $a_value = array_map(
203 static function (
string $value):
string {
206 explode(
";", trim($a_value))
209 $this->allowed_domains = $a_value;
222 $login_arr = $login_arr ?: [];
224 foreach ($login_arr as $recipient) {
225 if (!$recipient = trim($recipient)) {
229 $this->unknown[] = $recipient;
234 if (count($this->unknown)) {
245 $this->
settings->set(
'reg_role_assignment', (
string) $this->role_type);
246 $this->
settings->set(
'new_registration_type', (
string) $this->registration_type);
247 $this->
settings->set(
'passwd_reg_auto_generate', (
string) $this->password_generation_enabled);
248 $this->
settings->set(
'approve_recipient', addslashes(serialize($this->approve_recipient_ids)));
249 $this->
settings->set(
'reg_access_limitation', (
string) $this->access_limitation);
250 $this->
settings->set(
'reg_hash_life_time', (
string) $this->reg_hash_life_time);
251 $this->
settings->set(
'reg_allow_codes', (
string) $this->reg_allow_codes);
252 $this->
settings->set(
'reg_allowed_domains', implode(
';', $this->allowed_domains));
261 $this->role_type = (
int) $this->
settings->get(
'reg_role_assignment',
'1');
262 $this->password_generation_enabled = (bool) $this->
settings->get(
'passwd_reg_auto_generate');
263 $this->access_limitation = (bool) $this->
settings->get(
'reg_access_limitation');
264 $this->reg_hash_life_time = (
int) $this->
settings->get(
'reg_hash_life_time');
265 $this->reg_allow_codes = (bool) $this->
settings->get(
'reg_allow_codes');
267 $this->approve_recipient_ids = unserialize(
268 stripslashes($this->
settings->get(
'approve_recipient',
"")),
269 [
'allowed_classes' =>
false]
274 foreach ($this->approve_recipient_ids as
$id) {
276 $tmp_logins[] = $login;
279 $this->approve_recipient_logins = implode(
',', $tmp_logins);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static _lookupId($a_user_str)
static _lookupLogin(int $a_user_id)
Class ilObjAuthSettingsGUI.
const IL_REG_ROLE_UNDEFINED
const IL_REG_ERROR_NO_PERM
const REG_HASH_LIFETIME_MIN_VALUE
setRegistrationHashLifetime(int $a_lifetime)
setApproveRecipientLogins(string $a_rec_string)
setAllowedDomains(string $a_value)
automaticRoleAssignmentEnabled()
string $approve_recipient_logins
array $approve_recipient_ids
setPasswordGenerationStatus(bool $a_status)
static _lookupRegistrationType()
passwordGenerationEnabled()
const IL_REG_ERROR_UNKNOWN
getRegistrationHashLifetime()
registrationCodeRequired()
bool $password_generation_enabled
setAllowCodes(bool $a_allow_codes)
setRegistrationType(int $a_type)
getApproveRecipientLogins()
setAccessLimitation(bool $a_access_limitation)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...