diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index 6dbf68d..52c96f0 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -1543,8 +1543,8 @@ class auth_plugin_ldap extends auth_plugin_base { $connresult = ldap_connect($server); //ldap_connect returns ALWAYS true - if (!empty($this->config->version)) { - ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $this->config->version); + if (!empty($this->config->ldapversion)) { + ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $this->config->ldapversion); } // Fix MDL-10921 @@ -1995,8 +1995,8 @@ class auth_plugin_ldap extends auth_plugin_base { {$config->bind_dn = ''; } if (!isset($config->bind_pw)) {$config->bind_pw = ''; } - if (!isset($config->version)) - {$config->version = '2'; } + if (!isset($config->ldapversion)) + {$config->ldapversion = '2'; } if (!isset($config->objectclass)) {$config->objectclass = ''; } if (!isset($config->memberattribute)) @@ -2048,7 +2048,7 @@ class auth_plugin_ldap extends auth_plugin_base { set_config('preventpassindb', $config->preventpassindb, 'auth/ldap'); set_config('bind_dn', $config->bind_dn, 'auth/ldap'); set_config('bind_pw', $config->bind_pw, 'auth/ldap'); - set_config('version', $config->version, 'auth/ldap'); + set_config('ldapversion', $config->ldapversion, 'auth/ldap'); set_config('objectclass', trim($config->objectclass), 'auth/ldap'); set_config('memberattribute', $config->memberattribute, 'auth/ldap'); set_config('memberattribute_isdn', $config->memberattribute_isdn, 'auth/ldap'); diff --git a/auth/ldap/config.html b/auth/ldap/config.html index cb9ee66..ef56e5b 100644 --- a/auth/ldap/config.html +++ b/auth/ldap/config.html @@ -21,8 +21,8 @@ {$config->bind_dn = ''; } if (!isset($config->bind_pw)) {$config->bind_pw = ''; } - if (!isset($config->version)) - {$config->version = '2'; } + if (!isset($config->ldapversion)) + {$config->ldapversion = '2'; } if (!isset($config->objectclass)) {$config->objectclass = ''; } if (!isset($config->memberattribute)) @@ -95,8 +95,8 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $versions = array(); $versions[2] = '2'; $versions[3] = '3'; - echo html_writer::select($versions, 'version', $config->version, false); - if (isset($err['version'])) echo $OUTPUT->error_text($err['version']); + echo html_writer::select($versions, 'ldapversion', $config->ldapversion, false); + if (isset($err['ldapversion'])) echo $OUTPUT->error_text($err['ldapversion']); ?>