mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merged MDL-13810 Fixed check for ul.timeaccess
This commit is contained in:
parent
68be1fe1e7
commit
fffb5d240a
@ -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 = '';
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user