-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.7.3
-
None
-
MOODLE_27_STABLE
If a user has two roles in a course and you call get_role_users method with an array containing both those role IDs, it will throw a DB error:
'Did you remember to make the first column something unique in your call to get_records? Duplicate value 'xx' found in column 'id'.'
This is because the SELECT DISTINCT will not separate out the two rows as the roleid is different (MySQL).
You could group by the u.id but you may want to return both roles?..
- duplicates
-
MDL-22309 get_role_users() with more than one role assigned to user
-
- Closed
-