-
Bug
-
Resolution: Fixed
-
Minor
-
2.7.18, 3.2.4, 3.3.1
-
MOODLE_27_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
-
MOODLE_32_STABLE, MOODLE_33_STABLE
-
MDL-59432-master -
How to reproduce:
Map the same column in the external database to two different profile fields (e.g. Lastaname and Lastnamephonetic) and map some other columns before and after the two.
After user authentication, profile data values are not as expected.
Cause:
The DB fields mapping generates a query such as:
SELECT <mapped field 1>, <mapped field 2>, ... FROM...
When a DB column is mapped twice, the query results such as:
SELECT lastname, ..., lastname, ... FROM...
Unfortunately ADOdb connection is set to return an associative array, thus same-name columns colaesce in only one, returning fields are not alligned as expected in the query and the behaviour is impredicible.