1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-25 10:26:17 +02:00

MDL-63255 core_user: fix harcoded sql table aliases

This commit is contained in:
Víctor Déniz Falcón 2018-09-03 06:53:40 +01:00
parent 175b3708c9
commit b93767f3ee

@ -1505,7 +1505,7 @@ function user_get_course_lastaccess_sql($accesssince = null, $tableprefix = 'ul'
if ($accesssince == -1) { // Never.
return $tableprefix . '.timeaccess = 0';
} else {
return $tableprefix . '.timeaccess != 0 AND ul.timeaccess < ' . $accesssince;
return $tableprefix . '.timeaccess != 0 AND ' . $tableprefix . '.timeaccess < ' . $accesssince;
}
}
@ -1524,7 +1524,7 @@ function user_get_user_lastaccess_sql($accesssince = null, $tableprefix = 'u') {
if ($accesssince == -1) { // Never.
return $tableprefix . '.lastaccess = 0';
} else {
return $tableprefix . '.lastaccess != 0 AND u.lastaccess < ' . $accesssince;
return $tableprefix . '.lastaccess != 0 AND ' . $tableprefix . '.lastaccess < ' . $accesssince;
}
}