From 5db97a46a56116a14a7b94036cd2397b7c79db3e Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 28 Mar 2006 17:13:09 +0000 Subject: [PATCH] We don't need to convert to Unicode if Moodle is running under Unicode. (anyway, we need a new field inside each authentication system to be able to define the external encoding!) --- auth/ldap/lib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/auth/ldap/lib.php b/auth/ldap/lib.php index c1f01e74eb..96df846aaf 100644 --- a/auth/ldap/lib.php +++ b/auth/ldap/lib.php @@ -206,7 +206,11 @@ function auth_user_create ($userobject,$plainpass) { } foreach ($values as $value) { if(!empty($userobject->$key) ){ - $newuser[$value]=utf8_encode($userobject->$key); + if (!empty($CFG->unicodedb)) { + $newuser[$value]= $userobject->$key; + } else { + $newuser[$value]=utf8_encode($userobject->$key); + } } } } -- 2.39.5