Fixed support in LDAP for apostrophes, quotes and backslashes in LDAP data. This is a backport of a fix already in HEAD.

Discussed in: http://moodle.org/mod/forum/discuss.php?d=15403
This commit is contained in:
martinlanghoff
2004-11-22 21:51:09 +00:00
parent 1cc1fdcd6f
commit b2a07f418c
+1 -1
View File
@@ -132,7 +132,7 @@ function auth_get_userinfo($username){
$user_entry = ldap_get_entries($ldap_connection, $user_info_result);
foreach ($attrmap as $key=>$value){
if(isset($user_entry[0][strtolower($value)][0])){
$result[$key]=utf8_decode($user_entry[0][strtolower($value)][0]);
$result[$key]=addslashes(stripslashes(utf8_decode($user_entry[0][strtolower($value)][0])));
}
}
$result['guid']='ldap';