]> git.mjollnir.org Git - moodle.git/commit
accesslib: get_user_by_capability() - Simple cases now handle multiple RAs
authormartinlanghoff <martinlanghoff>
Sun, 6 Jan 2008 23:23:46 +0000 (23:23 +0000)
committermartinlanghoff <martinlanghoff>
Sun, 6 Jan 2008 23:23:46 +0000 (23:23 +0000)
commit2d1669b0d559e09ea837b694ef5ccf7fcf1b29f1
tree793e8e5136eb2f33cf5dee6920c63d4a1da0202b
parent8b8bf40cc7b2ec3618b93ea1c5fdea9792e02c48
accesslib: get_user_by_capability() - Simple cases now handle multiple RAs

The "simple" case SQL did not handle multiple enrolments for the same
user correctly -- it would generate multiple rows for those users,
incorrectly.

With this patch we move the join to RA to a subselect where DISTINCT
takes care of things.

MDL-12452
lib/accesslib.php