dirroot.'/auth/cas/languages.php'); // set to defaults if undefined (CAS) if (!isset ($config->hostname)) { $config->hostname = ''; } if (!isset ($config->port)) { $config->port = ''; } if (!isset ($config->casversion)) { $config->casversion = CAS_VERSION_2_0; } if (!isset ($config->baseuri)) { $config->baseuri = ''; } if (!isset ($config->language)) { $config->language = ''; } if (!isset ($config->proxycas)) { $config->proxycas = ''; } if (!isset ($config->logoutcas)) { $config->logoutcas = ''; } if (!isset ($config->multiauth)) { $config->multiauth = ''; } if (!isset ($config->certificate_check)) { $config->certificate_check = ''; } if (!isset ($config->certificate_path)) { $config->certificate_path = ''; } if (!isset($config->curl_ssl_version)) { $config->curl_ssl_version = ''; } if (!isset($config->logout_return_url)) { $config->logout_return_url = ''; } // set to defaults if undefined (LDAP) if (!isset($config->host_url)) { $config->host_url = ''; } if (!isset($config->start_tls)) { $config->start_tls = false; } if (empty($config->ldapencoding)) { $config->ldapencoding = 'utf-8'; } if (!isset($config->pagesize)) { $config->pagesize = LDAP_DEFAULT_PAGESIZE; } if (!isset($config->contexts)) { $config->contexts = ''; } if (!isset($config->user_type)) { $config->user_type = 'default'; } if (!isset($config->user_attribute)) { $config->user_attribute = ''; } if (!isset($config->search_sub)) { $config->search_sub = ''; } if (!isset($config->opt_deref)) { $config->opt_deref = LDAP_DEREF_NEVER; } if (!isset($config->bind_dn)) { $config->bind_dn = ''; } if (!isset($config->bind_pw)) { $config->bind_pw = ''; } if (!isset($config->ldap_version)) { $config->ldap_version = '3'; } if (!isset($config->objectclass)) { $config->objectclass = ''; } if (!isset($config->memberattribute)) { $config->memberattribute = ''; } if (!isset($config->memberattribute_isdn)) { $config->memberattribute_isdn = ''; } if (!isset($config->groupecreators)) { $config->groupecreators = ''; } if (!isset($config->attrcreators)) { $config->attrcreators = ''; } if (!isset($config->removeuser)) { $config->removeuser = AUTH_REMOVEUSER_KEEP; } $yesno = array( get_string('no'), get_string('yes') ); $disabled = ''; $pagedresultssupported = false; if ($config->host_url !== '') { /** * We try to connect each and every time we open the config, because we want to set the Page * Size setting as enabled or disabled depending on the configured LDAP server supporting * pagination or not, and to notify the user about it. If the user changed the LDAP server (or * the LDAP protocol version) last time, it might happen that paged results are no longer * available and we want to show that to the user the next time she goes to the settings page. */ try { $ldapconn = $this->ldap_connect(); $pagedresultssupported = ldap_paged_results_supported($config->ldap_version, $ldapconn); } catch (Exception $e) { // If we couldn't connect and get the supported options, we can only assume we don't support paged results. $pagedresultssupported = false; } } /* Make sure we only disable the paged result size setting and show the notification about it if * there is a configured server that we tried to contact. Othersiwe, if someone's LDAP server does * support paged results, they won't be able to turn it on the first time they set it up (because * the field will be disabled). */ if (($config->host_url !== '') && (!$pagedresultssupported)) { $disabled = ' disabled="disabled"'; echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'), \core\output\notification::NOTIFY_INFO); } ?> '; $help .= get_string('auth_updateremote_ldap', 'auth'); print_auth_lock_options($this->authtype, $user_fields, $help, true, true, $this->get_custom_user_profile_fields()); ?>

error_text($err['hostname']); } ?>
error_text($err['baseuri']); } ?>
error_text($err['port']); } ?>
: casversion, false); if (isset($err['casversion'])) { echo $OUTPUT->error_text($err['casversion']); } ?>
: language, false); ?>
: proxycas, false); ?>
: logoutcas, false); ?>
: multiauth, false); ?>
: certificate_check, false); ?>
error_text($err['certificate_path']); ?>
curl_ssl_version, false); if (isset($err['curl_ssl_version'])) echo $OUTPUT->error_text($err['curl_ssl_version']); ?>
: error_text($err['logout_return_url']); } ?>

error_text($err['host_url']); } ?>
ldap_version, false); if (isset($err['ldap_version'])) { echo $OUTPUT->error_text($err['ldap_version']); } ?>
start_tls, false); ?>
error_text($err['ldapencoding']); } ?>
/> error_text($err['pagesize']); } if ($disabled) { // Don't loose the page size value (disabled fields are not submitted!) ?>

error_text($err['bind_dn']); } ?>
error_text($err['bind_pw']); } ?>

user_type, false); if (isset($err['user_type'])) { echo $OUTPUT->error_text($err['user_type']); } ?>
error_text($err['contexts']); } ?>
search_sub, false); ?>
opt_deref, false); if (isset($err['opt_deref'])) { echo $OUTPUT->error_text($err['opt_deref']); } ?>
error_text($err['user_attribute']); } ?>
error_text($err['memberattribute']); } ?>
error_text($err['memberattribute_isdn']); } ?>
error_text($err['objectclass']); } ?>

error_text($err['attrcreators']); } ?>
error_text($err['groupecreators']); } ?>

removeuser, false); ?>