To work around this issue use the awesome patch from Inaki Arenaza. See the following link:
http://orodruin.escomposlinux.org/~iarenaza/moodle/enrol_db/
Enrolment
External database enrollment questions?
This discussion has been locked so you can no longer reply to it.