25 define(
'IL_REG_DISABLED', 1);
26 define(
'IL_REG_DIRECT', 2);
27 define(
'IL_REG_APPROVE', 3);
28 define(
'IL_REG_ACTIVATION', 4);
29 define(
'IL_REG_CODES', 5);
31 define(
'IL_REG_ROLES_FIXED', 1);
32 define(
'IL_REG_ROLES_EMAIL', 2);
34 define(
'IL_REG_ERROR_UNKNOWN', 1);
35 define(
'IL_REG_ERROR_NO_PERM', 2);
74 $this->registration_type = $a_type;
85 if ($ret < 1 or $ret > 5) {
120 $this->password_generation_enabled = $a_status;
130 $this->access_limitation = $a_access_limitation;
135 $this->approve_recipient_logins = $a_rec_string;
136 $this->approve_recipient_ids = array();
139 foreach (explode(
',', trim($this->approve_recipient_logins)) as
$login) {
141 $this->approve_recipient_ids[] = $uid;
151 return $this->approve_recipient_ids ? $this->approve_recipient_ids : array();
155 return implode(
',', $this->unknown);
168 $this->role_type = $a_type;
173 $this->reg_hash_life_time = $a_lifetime;
180 return max($this->reg_hash_life_time, self::REG_HASH_LIFETIME_MIN_VALUE);
185 $this->reg_allow_codes = (bool) $a_allow_codes;
197 $a_value = array_map(
201 explode(
";", trim($a_value))
204 $this->allowed_domains = $a_value;
214 $this->unknown = array();
215 $this->mail_perm = array();
218 $login_arr = $login_arr ? $login_arr : array();
219 foreach ($login_arr as $recipient) {
220 if (!$recipient = trim($recipient)) {
224 $this->unknown[] = $recipient;
230 if (count($this->unknown)) {
231 return self::ERR_UNKNOWN_RCP;
234 return self::ERR_MISSING_RCP;
244 $ilias = $DIC[
'ilias'];
246 $ilias->setSetting(
'reg_role_assignment', $this->role_type);
247 $ilias->setSetting(
'new_registration_type', $this->registration_type);
248 $ilias->setSetting(
'passwd_reg_auto_generate', $this->password_generation_enabled);
249 $ilias->setSetting(
'approve_recipient', addslashes(serialize($this->approve_recipient_ids)));
250 $ilias->setSetting(
'reg_access_limitation', $this->access_limitation);
251 $ilias->setSetting(
'reg_hash_life_time', $this->reg_hash_life_time);
252 $ilias->setSetting(
'reg_allow_codes', $this->reg_allow_codes);
253 $ilias->setSetting(
'reg_allowed_domains', implode(
';', $this->allowed_domains));
262 $ilias = $DIC[
'ilias'];
265 $this->registration_type = self::_lookupRegistrationType();
267 $this->role_type = $ilias->getSetting(
'reg_role_assignment', 1);
268 $this->password_generation_enabled = $ilias->getSetting(
'passwd_reg_auto_generate');
269 $this->access_limitation = $ilias->getSetting(
'reg_access_limitation');
270 $this->reg_hash_life_time = $ilias->getSetting(
'reg_hash_life_time');
271 $this->reg_allow_codes = (bool) $ilias->getSetting(
'reg_allow_codes');
273 $this->approve_recipient_ids = unserialize(stripslashes($ilias->getSetting(
'approve_recipient')));
274 $this->approve_recipient_ids = $this->approve_recipient_ids ?
275 $this->approve_recipient_ids :
279 $tmp_logins = array();
280 foreach ($this->approve_recipient_ids as $id) {
285 $this->approve_recipient_logins = implode(
',', $tmp_logins);
static _lookupLogin($a_user_id)
lookup login
static _lookupRegistrationType()
setPasswordGenerationStatus($a_status)
setRegistrationType($a_type)
static _lookupId($a_user_str)
Lookup id by login.
registrationCodeRequired()
getApproveRecipientLogins()
const REG_HASH_LIFETIME_MIN_VALUE
setAccessLimitation($a_access_limitation)
passwordGenerationEnabled()
setAllowedDomains($a_value)
setRegistrationHashLifetime($a_lifetime)
automaticRoleAssignmentEnabled()
setAllowCodes($a_allow_codes)
Class ilObjAuthSettingsGUI.
$approve_recipient_logins
$password_generation_enabled
setApproveRecipientLogins($a_rec_string)
getRegistrationHashLifetime()