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.62.2.7 -r1.62.2.8 --- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 17 Nov 2016 09:22:12 -0000 1.62.2.7 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 14 Feb 2017 15:51:07 -0000 1.62.2.8 @@ -495,14 +495,20 @@ } { util_memoize_flush [list acs_user::get_from_user_id_not_cached $user_id] # - # get username and authority_id so we can flush the - # get_from_username_not_cached proc + # Get username and authority_id so we can flush the + # get_from_username_not_cached proc. # - set u [acs_user::get -user_id $user_id] - set username [dict get $u username] - set authority_id [dict get $u authority_id] - util_memoize_flush [list acs_user::get_from_username_not_cached $username $authority_id] - util_memoize_flush [list acs_user::get_by_username_not_cached -authority_id $authority_id -username $username] + # Note, that it might be the case, that this function is called + # for user_ids, which are "persons", but do not qualify as + # "users". Therefore, the catch is used (like in earlier versions) + # + catch { + set u [acs_user::get -user_id $user_id] + set username [dict get $u username] + set authority_id [dict get $u authority_id] + util_memoize_flush [list acs_user::get_from_username_not_cached $username $authority_id] + util_memoize_flush [list acs_user::get_by_username_not_cached -authority_id $authority_id -username $username] + } } ad_proc -public acs_user::get_element {