25 define(
'IL_REG_DISABLED',1);
26 define(
'IL_REG_DIRECT',2);
27 define(
'IL_REG_APPROVE',3);
28 define(
'IL_REG_ACTIVATION',4);
30 define(
'IL_REG_ROLES_FIXED',1);
31 define(
'IL_REG_ROLES_EMAIL',2);
33 define(
'IL_REG_ERROR_UNKNOWN',1);
34 define(
'IL_REG_ERROR_NO_PERM',2);
59 return $this->registration_type;
63 $this->registration_type = $a_type;
92 return $this->password_generation_enabled;
96 $this->password_generation_enabled = $a_status;
101 return $this->access_limitation;
106 $this->access_limitation = $a_access_limitation;
111 $this->approve_recipient_logins = $a_rec_string;
112 $this->approve_recipient_ids = array();
115 foreach(explode(
',',trim($this->approve_recipient_logins)) as
$login)
119 $this->approve_recipient_ids[] = $uid;
125 return $this->approve_recipient_logins;
129 return $this->approve_recipient_ids ? $this->approve_recipient_ids : array();
133 return implode(
',',$this->unknown);
146 $this->role_type = $a_type;
151 $this->reg_hash_life_time = $a_lifetime;
165 $this->unknown = array();
166 $this->mail_perm = array();
169 $login_arr = $login_arr ? $login_arr : array();
170 foreach($login_arr as $recipient)
172 if(!$recipient = trim($recipient))
178 $this->unknown[] = $recipient;
186 if(count($this->unknown))
202 $ilias->setSetting(
'reg_role_assignment',$this->role_type);
203 $ilias->setSetting(
'new_registration_type',$this->registration_type);
204 $ilias->setSetting(
'passwd_reg_auto_generate',$this->password_generation_enabled);
205 $ilias->setSetting(
'approve_recipient',addslashes(serialize($this->approve_recipient_ids)));
206 $ilias->setSetting(
'reg_access_limitation',$this->access_limitation);
207 $ilias->setSetting(
'reg_hash_life_time',$this->reg_hash_life_time);
216 $this->registration_type = $ilias->getSetting(
'new_registration_type');
217 $this->role_type = $ilias->getSetting(
'reg_role_assignment',1);
218 $this->password_generation_enabled = $ilias->getSetting(
'passwd_reg_auto_generate');
219 $this->access_limitation = $ilias->getSetting(
'reg_access_limitation');
220 $this->reg_hash_life_time = $ilias->getSetting(
'reg_hash_life_time');
222 $this->approve_recipient_ids = unserialize(stripslashes($ilias->getSetting(
'approve_recipient')));
223 $this->approve_recipient_ids = $this->approve_recipient_ids ?
224 $this->approve_recipient_ids :
228 $tmp_logins = array();
229 foreach($this->approve_recipient_ids as $id)
236 $this->approve_recipient_logins = implode(
',',$tmp_logins);