From: stronk7 Date: Tue, 28 Mar 2006 17:13:09 +0000 (+0000) Subject: We don't need to convert to Unicode if Moodle is running under Unicode. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5db97a46a56116a14a7b94036cd2397b7c79db3e;p=moodle.git 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!) --- 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); + } } } }