data = array (); $table->width = '100%'; $table->class = 'databox filters table_result_auth'; $table->size['name'] = '30%'; $table->style['name'] = "font-weight: bold"; $type_auth = (string) get_parameter ('type_auth', ''); //field for all types except mysql if($type_auth != 'mysql'){ // Fallback to local authentication $row = array(); $row['name'] = __('Fallback to local authentication') . ui_print_help_tip(__("Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed."), true); $row['control'] = __('Yes').' '.html_print_radio_button('fallback_local_auth', 1, '', $config['fallback_local_auth'], true).' '; $row['control'] .= __('No').' '.html_print_radio_button('fallback_local_auth', 0, '', $config['fallback_local_auth'], true); $table->data['fallback_local_auth'] = $row; if (enterprise_installed()) { // Autocreate remote users $row = array(); $row['name'] = __('Autocreate remote users'); $row['control'] = __('Yes').' '.html_print_radio_button_extended('autocreate_remote_users', 1, '', $config['autocreate_remote_users'], false, '', '', true).' '; $row['control'] .= __('No').' '.html_print_radio_button_extended('autocreate_remote_users', 0, '', $config['autocreate_remote_users'], false, '', '', true); $table->data['autocreate_remote_users'] = $row; add_enterprise_auth_autocreate_profiles($table, $type_auth); } } switch ($type_auth) { case "mysql": break; case "ldap": // LDAP server $row = array(); $row['name'] = __('LDAP server'); $row['control'] = html_print_input_text('ldap_server', $config['ldap_server'], '', 30, 100, true); $table->data['ldap_server'] = $row; // LDAP port $row = array(); $row['name'] = __('LDAP port'); $row['control'] = html_print_input_text('ldap_port', $config['ldap_port'], '', 10, 100, true); $table->data['ldap_port'] = $row; // LDAP version $ldap_versions = array (1 => 'LDAPv1', 2 => 'LDAPv2', 3 => 'LDAPv3'); $row = array(); $row['name'] = __('LDAP version'); $row['control'] = html_print_select($ldap_versions, 'ldap_version', $config['ldap_version'], '', '', 0, true); $table->data['ldap_version'] = $row; // Start TLS $row = array(); $row['name'] = __('Start TLS'); $row['control'] = __('Yes').' '.html_print_radio_button ('ldap_start_tls', 1, '', $config['ldap_start_tls'], true).' '; $row['control'] .= __('No').' '.html_print_radio_button ('ldap_start_tls', 0, '', $config['ldap_start_tls'], true); $table->data['ldap_start_tls'] = $row; // Base DN $row = array(); $row['name'] = __('Base DN'); $row['control'] = html_print_input_text ('ldap_base_dn', $config['ldap_base_dn'], '', 60, 100, true); $table->data['ldap_base_dn'] = $row; // Login attribute $row = array(); $row['name'] = __('Login attribute'); $row['control'] = html_print_input_text ('ldap_login_attr', $config['ldap_login_attr'], '', 60, 100, true); $table->data['ldap_login_attr'] = $row; // Admin LDAP login $row = array(); $row['name'] = __('Admin LDAP login'); $row['control'] = html_print_input_text ('ldap_admin_login', $config['ldap_admin_login'], '', 60, 100, true); $table->data['ldap_admin_login'] = $row; // Admin LDAP password $row = array(); $row['name'] = __('Admin LDAP password'); $row['control'] = html_print_input_password ('ldap_admin_pass', $config['ldap_admin_pass'], $alt = '', 60, 100, true); $table->data['ldap_admin_pass'] = $row; break; case 'pandora': case 'ad': case 'saml': case 'integria': // Add enterprise authentication options if (enterprise_installed()) { add_enterprise_auth_options($table, $type_auth); } break; } // field for all types // Enable double authentication // Set default value set_unless_defined($config['double_auth_enabled'], false); $row = array(); $row['name'] = __('Double authentication') . ui_print_help_tip(__("If this option is enabled, the users can use double authentication with their accounts"), true); $row['control'] = __('Yes') . ' '; $row['control'] .= html_print_radio_button('double_auth_enabled', 1, '', $config['double_auth_enabled'], true); $row['control'] .= ' '; $row['control'] .= __('No') .' '; $row['control'] .= html_print_radio_button('double_auth_enabled', 0, '', $config['double_auth_enabled'], true); $table->data['double_auth_enabled'] = $row; // Session timeout // Default session timeout set_when_empty ($config["session_timeout"], 90); $row = array(); $row['name'] = __('Session timeout (mins)') . ui_print_help_tip(__("This is defined in minutes, If you wish a permanent session should putting -1 in this field."), true); $row['control'] = html_print_input_text ('session_timeout', $config["session_timeout"], '', 10, 10, true); $table->data['session_timeout'] = $row; html_print_table($table); return; } } include_once($config['homedir'] . "/include/functions_profile.php"); $table = new StdClass(); $table->data = array (); $table->width = '100%'; $table->class = 'databox filters'; $table->size['name'] = '30%'; $table->style['name'] = "font-weight: bold"; // Auth methods added to the table (doesn't take in account mysql) $auth_methods_added = array(); // Remote options row names // Fill this array for every matched row $remote_rows = array(); // Autocreate options row names // Fill this array for every matched row $autocreate_rows = array(); $no_autocreate_rows = array(); // LDAP data row names // Fill this array for every matched row $ldap_rows = array(); // Method $auth_methods = array ('mysql' => __('Local %s', get_product_name()), 'ldap' => __('ldap')); if (enterprise_installed()) { add_enterprise_auth_methods($auth_methods); } $row = array(); $row['name'] = __('Authentication method'); $row['control'] = html_print_select($auth_methods, 'auth', $config['auth'], '', '', 0, true); $table->data['auth'] = $row; // Form echo '
'; ?>