MDL-9399 auth/ldap: NTLM SSO - move textlib conversion earlier

From Iñaki Arenaza - fix for

... I forgot to put the textlib conversion
call before the block of code that uses $extusername, so it
completely breaks the user validation process.
This commit is contained in:
martinlanghoff 2007-11-14 22:12:07 +00:00
parent 83cd2dce5a
commit 6221a32121

View File

@ -85,6 +85,10 @@ class auth_plugin_ldap extends auth_plugin_base {
return false;
}
$textlib = textlib_get_instance();
$extusername = $textlib->convert(stripslashes($username), 'utf-8', $this->config->ldapencoding);
$extpassword = $textlib->convert(stripslashes($password), 'utf-8', $this->config->ldapencoding);
//
// Before we connect to LDAP, check if this is an AD SSO login
// if we succeed in this block, we'll return success early.
@ -125,10 +129,6 @@ class auth_plugin_ldap extends auth_plugin_base {
unset($key);
$textlib = textlib_get_instance();
$extusername = $textlib->convert(stripslashes($username), 'utf-8', $this->config->ldapencoding);
$extpassword = $textlib->convert(stripslashes($password), 'utf-8', $this->config->ldapencoding);
$ldapconnection = $this->ldap_connect();
if ($ldapconnection) {