▶🚶Reproduction steps
Line 853 of app/lib/classes/class.listing.php sets $requester to the user ID then passes it to the render function, which will then load the user and login data from the DB recursively. Simply passing the user array instead prevents this. Patch below.
[CODE title="Patch"]--- a/class.listing.php 2019-07-27 01:56:06.692832669 +0100
+++ b/class.listing.php 2019-07-27 01:56:22.379951294 +0100
@@ -850,7 +850,7 @@
$render = 'CHV\Render\get_peafowl_item_list';
}
- $requester = Login::getUser()['id'];
+ $requester = Login::getUser();
$html_output .= $render($tpl_list, $item, $list_item_template, $requester, $tools);
}
[/CODE]
- View the DB queries for viewing a userpage.
- Note that every image causes a additional DB query on the user table and login table.
Line 853 of app/lib/classes/class.listing.php sets $requester to the user ID then passes it to the render function, which will then load the user and login data from the DB recursively. Simply passing the user array instead prevents this. Patch below.
[CODE title="Patch"]--- a/class.listing.php 2019-07-27 01:56:06.692832669 +0100
+++ b/class.listing.php 2019-07-27 01:56:22.379951294 +0100
@@ -850,7 +850,7 @@
$render = 'CHV\Render\get_peafowl_item_list';
}
- $requester = Login::getUser()['id'];
+ $requester = Login::getUser();
$html_output .= $render($tpl_list, $item, $list_item_template, $requester, $tools);
}
[/CODE]