]> git.mjollnir.org Git - moodle.git/commitdiff
fixed $groupidsql in get_users_by_capability()
authorskodak <skodak>
Sat, 16 Sep 2006 05:56:51 +0000 (05:56 +0000)
committerskodak <skodak>
Sat, 16 Sep 2006 05:56:51 +0000 (05:56 +0000)
lib/accesslib.php

index 1110a8411d5a0b151675e85b32aa5c545b34b86b..4fcce4c180b6bd2f9456329663d71016c23fe12b 100755 (executable)
@@ -2300,9 +2300,9 @@ function get_users_by_capability($context, $capability, $fields='u.*, ul.timeacc
         $groupjoin = 'INNER JOIN '.$CFG->prefix.'groups_members gm ON gm.userid = ra.userid';
         
         if (is_array($groups)) {
-            $groupsql = 'AND gm.id IN ('.implode(',', $groups).')';
+            $groupsql = 'AND gm.groupid IN ('.implode(',', $groups).')';
         } else {
-            $groupsql = 'AND gm.id = '.$groups; 
+            $groupsql = 'AND gm.groupid = '.$groups; 
         }
     } else {
         $groupjoin = '';