Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl,v diff -u -N -r1.98.2.4 -r1.98.2.5 --- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 19 Aug 2019 10:44:04 -0000 1.98.2.4 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 5 Sep 2019 13:47:02 -0000 1.98.2.5 @@ -1178,10 +1178,13 @@ @param user_id user_id of the user for whom we need the portrait } { - set item_id [content::item::get_id_by_name \ - -name "portrait-of-user-$user_id" \ - -parent_id $user_id] - return [expr {$item_id ne "" ? $item_id : 0}] + return [db_string get_portrait { + select c.item_id + from acs_rels a, cr_items c + where a.object_id_two = c.item_id + and a.object_id_one = :user_id + and a.rel_type = 'user_portrait_rel' + } -default 0] } ad_proc -private acs_user::flush_portrait {