]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15175: fix sync with external Oracle database merged from 1.9
authorjerome <jerome>
Wed, 13 Aug 2008 06:41:46 +0000 (06:41 +0000)
committerjerome <jerome>
Wed, 13 Aug 2008 06:41:46 +0000 (06:41 +0000)
auth/db/auth.php

index ac42e62919c23d9e050ea463f1f3217d7f195f88..bf13ac321885a85bacbaf05f3d88c1ca7d79a5c8 100644 (file)
@@ -175,6 +175,7 @@ class auth_plugin_db extends auth_plugin_base {
             if ($rs = $authdb->Execute($sql)) {
                 if ( !$rs->EOF ) {
                     $fields_obj = $rs->FetchObj();
+                    $fields_obj = (object)array_change_key_case((array)$fields_obj , CASE_LOWER);
                     foreach ($selectfields as $localname=>$externalname) {
                         $result[$localname] = $textlib->convert($fields_obj->{$localname}, $this->config->extencoding, 'utf-8');
                      }
@@ -419,7 +420,7 @@ class auth_plugin_db extends auth_plugin_base {
             print_error('auth_dbcantconnect','auth');
         } else if ( !$rs->EOF ) {
             while ($rec = $rs->FetchRow()) {
-                array_push($result, $rec->username);
+                array_push($result, $rec->USERNAME);
             }
         }