76 if (isset(self::$instance) and self::$instance) {
77 return self::$instance;
84 return $this->active ? true :
false;
88 $this->active = $a_status;
92 $this->port = $a_port;
100 $this->secret = $a_secret;
108 $this->server_string = $a_server_string;
109 $this->servers = explode(
',', $this->server_string);
113 return implode(
',', $this->servers);
117 return $this->servers ? $this->servers :
array();
121 $this->name = $a_name;
139 return $auth_params ? $auth_params :
array();
151 return $this->default_role;
156 $this->default_role = $a_role;
167 return $this->creation;
179 $this->creation = $a_status;
191 $this->account_migration = $a_status;
202 return $this->account_migration ? true :
false;
213 return $this->charset ? 1 : 0;
225 $this->charset = $a_charset;
237 $this->
settings->deleteLike(
'radius_server%');
250 $this->
settings->set(
'radius_server', trim($server));
256 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
279 return $ok and $role_ok;
290 return preg_match(
"/^[0-9]{0,5}$/", $this->
getPort()) == 1;
301 $servers = explode(
",", $this->server_string);
304 $server = trim($server);
322 $all_settings = $this->
settings->getAll();
325 "radius_port" =>
"setPort",
326 "radius_shared_secret" =>
"setSecret",
327 "radius_name" =>
"setName",
328 "radius_creation" =>
"enableCreation",
329 "radius_migration" =>
"enableAccountMigration",
330 "radius_charset" =>
"setCharset" 333 if (isset($all_settings[
$s])) {
334 $this->
$m($all_settings[$s]);
338 reset($all_settings);
339 foreach ($all_settings as $k => $v) {
340 if (substr($k, 0, 13) ==
"radius_server") {
341 $this->servers[] = $v;
345 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
347 $this->default_role = 0;
348 if (isset($roles[0]) && $roles[0]) {
349 $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