Skip to content

Commit

Permalink
Merged MDL-13810 Fixed check for ul.timeaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Mar 6, 2008
1 parent 68be1fe commit fffb5d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/accesslib.php
Expand Up @@ -4525,11 +4525,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 = '';
}

//
Expand Down

0 comments on commit fffb5d2

Please sign in to comment.