Skip to content
Browse files

MDL-13810 Fixed check for ul.timeaccess

  • Loading branch information...
1 parent edd01f0 commit d8f4ee51a519f14762604da65e5025c3590be827 moodler committed Mar 6, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/accesslib.php
View
6 lib/accesslib.php
@@ -4520,11 +4520,11 @@ function get_users_by_capability($context, $capability, $fields='', $sort='',
$sortby = $sort ? " ORDER BY $sort " : '';
// User lastaccess JOIN
- if ($sort == 'ul.timeaccess') {
+ if (strpos($sort, 'ul.timeaccess') === FALSE) { // user_lastaccess is not required MDL-13810
+ $uljoin = '';
+ } else {
$uljoin = "LEFT OUTER JOIN {$CFG->prefix}user_lastaccess ul
ON (ul.userid = u.id AND ul.courseid = {$context->instanceid})";
- } else {
- $uljoin = '';
}
//

0 comments on commit d8f4ee5

Please sign in to comment.
Something went wrong with that request. Please try again.