Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-15175: ensures cross-db: add a lowercase conversion for the usern…

…ame, merged from 19
  • Loading branch information...
commit f6fd87d97b04c91f5dc89210c968abd64e95c016 1 parent 7fa260c
jerome authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 auth/db/auth.php
View
5 auth/db/auth.php
@@ -173,7 +173,7 @@ function get_userinfo($username) {
if ($rs = $authdb->Execute($sql)) {
if ( $rs->RecordCount() == 1 ) {
$fields_obj = rs_fetch_record($rs);
- $fields_obj = (object)array_change_key_case((array)$fields_obj , CASE_LOWER);
+ $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');
}
@@ -430,7 +430,8 @@ function get_userlist() {
print_error('auth_dbcantconnect','auth');
} else if ( $rs->RecordCount() ) {
while ($rec = rs_fetch_next_record($rs)) {
- array_push($result, $rec->USERNAME);
+ $rec = (object)array_change_key_case((array)$rec , CASE_LOWER);
+ array_push($result, $rec->username);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.