-
Bug
-
Resolution: Fixed
-
Minor
-
1.7
-
None
-
Windows XP, MySQL 5.0, MSSQL2000, Moodle 1.7
-
MySQL, Microsoft SQL
-
MOODLE_17_STABLE
-
MOODLE_17_STABLE, MOODLE_18_STABLE
When using external authentication I found out that the authentication module did not retrieve the database fields from the server.
I had to change line 110 in auth/db/lib.php from:
$result["$field"] = addslashes(stripslashes($rs->fields[0]));
to:
$result["$field"] = addslashes(stripslashes($rs->fields[$pcfg["field_map_$field"]]));
After that authentication with the external database worked fine.
I also had a similar problem in the database enrolment module (enrol/database/enrol.php) where I also had to change the field access from index to id.