From 200f64d2207d99c6e10ae7c33bf17588db58cd6f Mon Sep 17 00:00:00 2001 From: arborrow Date: Tue, 27 Nov 2007 20:18:19 +0000 Subject: [PATCH] MDL-10523 - Removing DISTINCT from the query will enable the function to work with MSSQL which was having difficulty with the current syntax and should not impact other queries because the user id should already be unique. --- group/lib/legacylib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group/lib/legacylib.php b/group/lib/legacylib.php index deb10b2d1bc..7fd5f217625 100644 --- a/group/lib/legacylib.php +++ b/group/lib/legacylib.php @@ -112,7 +112,7 @@ function get_group_users($groupid, $sort='u.lastaccess DESC', $exceptions='', if (!empty($extrafield)) { $extrafield = ','.$extrafield; } - return get_records_sql("SELECT DISTINCT $fields $extrafield + return get_records_sql("SELECT $fields $extrafield FROM {$CFG->prefix}user u, {$CFG->prefix}groups_members m WHERE m.groupid = '$groupid'