]> git.mjollnir.org Git - moodle.git/commitdiff
We don't need to convert to Unicode if Moodle is running under Unicode.
authorstronk7 <stronk7>
Tue, 28 Mar 2006 17:13:09 +0000 (17:13 +0000)
committerstronk7 <stronk7>
Tue, 28 Mar 2006 17:13:09 +0000 (17:13 +0000)
(anyway, we need a new field inside each authentication system to be
able to define the external encoding!)

auth/ldap/lib.php

index c1f01e74ebbf0e9dd1acbf45dc7eeb92b4687ee2..96df846aaf27150b495f87bfd6a68c36c7cb0263 100644 (file)
@@ -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);
+                }
             }
         }
     }