From a5d81e5e5e7a1736b730c2e7ae51ed9e30618a7b Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 19 Sep 2007 07:20:01 +0000 Subject: [PATCH] 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. --- user/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/index.php b/user/index.php index c2104ab6fa..3e8f4e877e 100644 --- a/user/index.php +++ b/user/index.php @@ -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'])) { -- 2.39.5