76 if(isset(self::$instance)
and self::$instance)
78 return self::$instance;
85 return $this->active ? true :
false;
89 $this->active = $a_status;
93 $this->port = $a_port;
101 $this->secret = $a_secret;
105 return $this->secret;
109 $this->server_string = $a_server_string;
110 $this->servers = explode(
',',$this->server_string);
114 return implode(
',',$this->servers);
118 return $this->servers ? $this->servers :
array();
122 $this->name = $a_name;
141 return $auth_params ? $auth_params :
array();
153 return $this->default_role;
158 $this->default_role = $a_role;
169 return $this->creation;
181 $this->creation = $a_status;
193 $this->account_migration = $a_status;
204 return $this->account_migration ? true :
false;
215 return $this->charset ? 1 : 0;
227 $this->charset = $a_charset;
239 $this->
settings->deleteLike(
'radius_server%');
254 $this->
settings->set(
'radius_server',trim($server));
262 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
298 return preg_match(
"/^[0-9]{0,5}$/",$this->
getPort()) == 1;
309 $servers = explode(
",",$this->server_string);
313 $server = trim($server);
332 $all_settings = $this->
settings->getAll();
334 $sets =
array(
"radius_active" =>
"setActive",
335 "radius_port" =>
"setPort",
336 "radius_shared_secret" =>
"setSecret",
337 "radius_name" =>
"setName",
338 "radius_creation" =>
"enableCreation",
339 "radius_migration" =>
"enableAccountMigration",
340 "radius_charset" =>
"setCharset" 342 foreach ($sets as $s => $m)
344 if (isset($all_settings[$s]))
346 $this->$m($all_settings[$s]);
350 reset($all_settings);
351 foreach($all_settings as $k => $v)
353 if (substr($k, 0, 13) ==
"radius_server")
355 $this->servers[] = $v;
359 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
361 $this->default_role = 0;
362 if (isset($roles[0]) && $roles[0])
364 $this->default_role = $roles[0];
toPearAuthArray()
Create options array for PEAR Auth constructor.
validatePort()
Validate port.
enableCreation($a_status)
Enable creation.
validateRequired()
Validate required.
static _updateAuthMode($a_roles)
static _resetAuthMode($a_auth_mode)
Reset auth mode to default.
setServerString($a_server_string)
isAccountMigrationEnabled()
enabled account migration
__construct()
singleton constructor
getDefaultRole()
Get default role for new radius users.
static _getInstance()
singleton get instance
enabledCreation()
Enable creation of users.
static _getRolesByAuthMode($a_auth_mode)
Get roles by auth mode.
validateServers()
Validate servers.
Create styles array
The data for the language used.
setCharset($a_charset)
set charset
enableAccountMigration($a_status)
Enable account migration.
const RADIUS_CHARSET_LATIN1
const RADIUS_CHARSET_UTF8