mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
user/index: make use of the smarter print_user_picture() -
Switch to using the smarter codepath in print_user_picture. Saves 20 DB queries in the normal page. One per user acct.
This commit is contained in:
parent
f312c5925f
commit
a5d81e5e5e
1 changed files with 2 additions and 2 deletions
|
@ -321,7 +321,7 @@
|
|||
} else {
|
||||
$selectrole = " ";
|
||||
}
|
||||
$select = 'SELECT u.id, u.username, u.firstname, u.lastname, u.email, u.city, u.country, u.picture, u.lang, u.timezone, u.emailstop, u.maildisplay, COALESCE(ul.timeaccess, 0) AS lastaccess, r.hidden '; // s.lastaccess
|
||||
$select = 'SELECT u.id, u.username, u.firstname, u.lastname, u.email, u.city, u.country, u.picture, u.lang, u.timezone, u.emailstop, u.maildisplay, u.imagealt, COALESCE(ul.timeaccess, 0) AS lastaccess, r.hidden '; // s.lastaccess
|
||||
$select .= $course->enrolperiod?', r.timeend ':'';
|
||||
|
||||
$from = "FROM {$CFG->prefix}user u INNER JOIN
|
||||
|
@ -554,7 +554,7 @@
|
|||
}
|
||||
|
||||
$data = array (
|
||||
print_user_picture($user->id, $course->id, $user->picture, false, true, $piclink),
|
||||
print_user_picture($user, $course->id, $user->picture, false, true, $piclink),
|
||||
$profilelink);
|
||||
|
||||
if (!isset($hiddenfields['city'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue