From 4966836795f27d6d4fb59c594f73330eb6afd011 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 19 Feb 2005 03:00:07 +0000 Subject: [PATCH] Extended choices in get_group_users --- lib/datalib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/datalib.php b/lib/datalib.php index 6971d5c6d22..fa24f818458 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -1977,14 +1977,14 @@ function get_groups($courseid, $userid=0) { * @return array * @todo Finish documenting this function */ -function get_group_users($groupid, $sort='u.lastaccess DESC', $exceptions='') { +function get_group_users($groupid, $sort='u.lastaccess DESC', $exceptions='', $fields='u.*') { global $CFG; if (!empty($exceptions)) { $except = ' AND u.id NOT IN ('. $exceptions .') '; } else { $except = ''; } - return get_records_sql("SELECT DISTINCT u.* + return get_records_sql("SELECT DISTINCT $fields FROM {$CFG->prefix}user u, {$CFG->prefix}groups_members m WHERE m.groupid = '$groupid'