Index: openacs-4/packages/acs-subsite/www/user/portrait/comment-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/portrait/comment-edit.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-subsite/www/user/portrait/comment-edit.tcl 21 Jan 2018 00:35:30 -0000 1.12 +++ openacs-4/packages/acs-subsite/www/user/portrait/comment-edit.tcl 29 May 2018 09:30:48 -0000 1.13 @@ -23,18 +23,29 @@ permission::require_permission -object_id $user_id -privilege "write" -if {![db_0or1row user_info {}]} { +if {![person::person_p -party_id $user_id]} { ad_return_error \ "Account Unavailable" \ "We can't find you (user #$user_id) in the users table. Probably your account was deleted for some reason." ad_script_abort } -if {![db_0or1row portrait_info {}]} { +set user [acs_user::get -user_id $user_id] +set first_names [dict get $user first_names] +set last_name [dict get $user last_name] + +set portrait_id [acs_user::get_portrait_id -user_id $user_id] + +if {$portrait_id == 0} { ad_return_complaint 1 "