71 if(isset(self::$instance) and self::$instance)
80 return $this->active ?
true :
false;
84 $this->active = $a_status;
88 $this->port = $a_port;
96 $this->secret = $a_secret;
100 return $this->secret;
104 $this->server_string = $a_server_string;
105 $this->servers = explode(
',',$this->server_string);
109 return implode(
',',$this->servers);
113 return $this->servers ? $this->servers : array();
117 $this->name = $a_name;
134 $auth_params[
'servers'][] = array($server,$this->
getPort(),$this->
getSecret());
136 return $auth_params ? $auth_params : array();
148 return $this->default_role;
153 $this->default_role = $a_role;
164 return $this->creation;
176 $this->creation = $a_status;
188 $this->account_migration = $a_status;
199 return $this->account_migration ?
true :
false;
210 return $this->charset ? 1 : 0;
222 $this->charset = $a_charset;
234 $this->settings->deleteLike(
'radius_server%');
236 $this->settings->set(
'radius_active',$this->
isActive() ? 1 : 0);
237 $this->settings->set(
'radius_port',$this->
getPort());
238 $this->settings->set(
'radius_shared_secret',$this->
getSecret());
239 $this->settings->set(
'radius_name',$this->
getName());
240 $this->settings->set(
'radius_creation',$this->
enabledCreation() ? 1 : 0);
242 $this->settings->set(
'radius_charset',$this->
getCharset() ? 1 : 0);
249 $this->settings->set(
'radius_server',trim($server));
253 $this->settings->set(
'radius_server'.$counter,trim($server));
257 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
282 return $ok and $role_ok;
293 return preg_match(
"/^[0-9]{0,5}$/",$this->
getPort()) == 1;
304 $servers = explode(
",",$this->server_string);
308 $server = trim($server);
327 $all_settings = $this->settings->getAll();
329 $this->
setActive($all_settings[
'radius_active']);
330 $this->
setPort($all_settings[
'radius_port']);
331 $this->
setSecret($all_settings[
'radius_shared_secret']);
332 $this->
setName($all_settings[
'radius_name']);
335 $this->
setCharset($all_settings[
'radius_charset']);
337 reset($all_settings);
338 foreach($all_settings as $k => $v)
340 if (substr($k, 0, 13) ==
"radius_server")
342 $this->servers[] = $v;
346 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
348 $this->default_role = $roles[0] ? $roles[0] : 0;