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);
62 return $this->registration_type;
66 $this->registration_type = $a_type;
99 return $this->password_generation_enabled;
103 $this->password_generation_enabled = $a_status;
108 return $this->access_limitation;
113 $this->access_limitation = $a_access_limitation;
118 $this->approve_recipient_logins = $a_rec_string;
119 $this->approve_recipient_ids = array();
122 foreach(explode(
',',trim($this->approve_recipient_logins)) as $login)
126 $this->approve_recipient_ids[] = $uid;
132 return $this->approve_recipient_logins;
136 return $this->approve_recipient_ids ? $this->approve_recipient_ids : array();
140 return implode(
',',$this->unknown);
153 $this->role_type = $a_type;
158 $this->reg_hash_life_time = $a_lifetime;
165 return max($this->reg_hash_life_time, self::REG_HASH_LIFETIME_MIN_VALUE);
170 $this->reg_allow_codes = (bool)$a_allow_codes;
184 $this->unknown = array();
185 $this->mail_perm = array();
188 $login_arr = $login_arr ? $login_arr : array();
189 foreach($login_arr as $recipient)
191 if(!$recipient = trim($recipient))
197 $this->unknown[] = $recipient;
205 if(count($this->unknown))
221 $ilias->setSetting(
'reg_role_assignment',$this->role_type);
222 $ilias->setSetting(
'new_registration_type',$this->registration_type);
223 $ilias->setSetting(
'passwd_reg_auto_generate',$this->password_generation_enabled);
224 $ilias->setSetting(
'approve_recipient',addslashes(serialize($this->approve_recipient_ids)));
225 $ilias->setSetting(
'reg_access_limitation',$this->access_limitation);
226 $ilias->setSetting(
'reg_hash_life_time',$this->reg_hash_life_time);
227 $ilias->setSetting(
'reg_allow_codes',$this->reg_allow_codes);
236 $this->registration_type = $ilias->getSetting(
'new_registration_type');
237 $this->role_type = $ilias->getSetting(
'reg_role_assignment',1);
238 $this->password_generation_enabled = $ilias->getSetting(
'passwd_reg_auto_generate');
239 $this->access_limitation = $ilias->getSetting(
'reg_access_limitation');
240 $this->reg_hash_life_time = $ilias->getSetting(
'reg_hash_life_time');
241 $this->reg_allow_codes = (bool)$ilias->getSetting(
'reg_allow_codes');
243 $this->approve_recipient_ids = unserialize(stripslashes($ilias->getSetting(
'approve_recipient')));
244 $this->approve_recipient_ids = $this->approve_recipient_ids ?
245 $this->approve_recipient_ids :
249 $tmp_logins = array();
250 foreach($this->approve_recipient_ids as $id)
254 $tmp_logins[] = $login;
257 $this->approve_recipient_logins = implode(
',',$tmp_logins);