# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/search/query.php
--- moodle/search/query.php Base (1.50)
+++ moodle/search/query.php Locally Modified (Based On 1.50)
@@ -343,8 +343,7 @@
             foreach ($hits as $listing) {
 
                 if ($listing->doctype == 'user'){ // A special handle for users
-                    //TODO: this is a performance problem, fetch data elsewhere
-                    $user = (object)array('id'=>$listing->userid);
+                    $user = $DB->get_record('user', array('id' => $listing->userid));
                     $icon = $OUTPUT->user_picture($user);
                 } else {
                     $iconpath = $OUTPUT->pix_url('icon', $listing->doctype);
