Permalink
Browse files

Fixed error in the SQL in get_users_by_capability() that made many th…

…ings not work properly on the course front page.
  • Loading branch information...
1 parent 9a10e2d commit 84dfbdd2f6a62d697d8195417d6dcbec05311dd0 gustav_delius committed Oct 16, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/accesslib.php
View
@@ -4159,7 +4159,7 @@ function get_users_by_capability($context, $capability, $fields='', $sort='',
if (!empty($CFG->defaultfrontpageroleid) && ($context->id == $frontpagectx->id || strstr($context->path, '/'.$frontpagectx->id.'/'))) {
$roles = get_roles_with_capability($capability, CAP_ALLOW, $context);
if (in_array($CFG->defaultfrontpageroleid, array_keys($roles))) {
- return get_records_sql("SELECT $fields FROM {$CFG->prefix}user ORDER BY $sort, $limitfrom, $limitnum");
+ return get_records_sql("SELECT $fields FROM {$CFG->prefix}user u ORDER BY $sort", $limitfrom, $limitnum);
}
}

0 comments on commit 84dfbdd

Please sign in to comment.