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);
60 return $this->registration_type;
64 $this->registration_type = $a_type;
97 return $this->password_generation_enabled;
101 $this->password_generation_enabled = $a_status;
106 return $this->access_limitation;
111 $this->access_limitation = $a_access_limitation;
116 $this->approve_recipient_logins = $a_rec_string;
117 $this->approve_recipient_ids = array();
120 foreach(explode(
',',trim($this->approve_recipient_logins)) as $login)
124 $this->approve_recipient_ids[] = $uid;
130 return $this->approve_recipient_logins;
134 return $this->approve_recipient_ids ? $this->approve_recipient_ids : array();
138 return implode(
',',$this->unknown);
151 $this->role_type = $a_type;
156 $this->reg_hash_life_time = $a_lifetime;
168 $this->reg_allow_codes = (bool)$a_allow_codes;
182 $this->unknown = array();
183 $this->mail_perm = array();
186 $login_arr = $login_arr ? $login_arr : array();
187 foreach($login_arr as $recipient)
189 if(!$recipient = trim($recipient))
195 $this->unknown[] = $recipient;
203 if(count($this->unknown))
219 $ilias->setSetting(
'reg_role_assignment',$this->role_type);
220 $ilias->setSetting(
'new_registration_type',$this->registration_type);
221 $ilias->setSetting(
'passwd_reg_auto_generate',$this->password_generation_enabled);
222 $ilias->setSetting(
'approve_recipient',addslashes(serialize($this->approve_recipient_ids)));
223 $ilias->setSetting(
'reg_access_limitation',$this->access_limitation);
224 $ilias->setSetting(
'reg_hash_life_time',$this->reg_hash_life_time);
225 $ilias->setSetting(
'reg_allow_codes',$this->reg_allow_codes);
234 $this->registration_type = $ilias->getSetting(
'new_registration_type');
235 $this->role_type = $ilias->getSetting(
'reg_role_assignment',1);
236 $this->password_generation_enabled = $ilias->getSetting(
'passwd_reg_auto_generate');
237 $this->access_limitation = $ilias->getSetting(
'reg_access_limitation');
238 $this->reg_hash_life_time = $ilias->getSetting(
'reg_hash_life_time');
239 $this->reg_allow_codes = (bool)$ilias->getSetting(
'reg_allow_codes');
241 $this->approve_recipient_ids = unserialize(stripslashes($ilias->getSetting(
'approve_recipient')));
242 $this->approve_recipient_ids = $this->approve_recipient_ids ?
243 $this->approve_recipient_ids :
247 $tmp_logins = array();
248 foreach($this->approve_recipient_ids as $id)
252 $tmp_logins[] = $login;
255 $this->approve_recipient_logins = implode(
',',$tmp_logins);