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.3 -r1.4 --- openacs-4/packages/acs-subsite/www/user/portrait/comment-edit.tcl 1 Mar 2005 00:01:24 -0000 1.3 +++ openacs-4/packages/acs-subsite/www/user/portrait/comment-edit.tcl 10 Jan 2007 21:22:11 -0000 1.4 @@ -17,7 +17,7 @@ set current_user_id [ad_conn user_id] -if [empty_string_p $user_id] { +if {$user_id eq ""} { set user_id $current_user_id set admin_p 0 } else { @@ -26,23 +26,23 @@ ad_require_permission $user_id "write" -if ![db_0or1row user_info "select +if {![db_0or1row user_info "select first_names, last_name from persons -where person_id = :user_id"] { +where person_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." return } -if ![db_0or1row portrait_info " +if {![db_0or1row portrait_info " select description from cr_revisions where revision_id = (select live_revision from cr_items c, acs_rels a where c.item_id = a.object_id_two and a.object_id_one = :user_id - and a.rel_type = 'user_portrait_rel')"] { + and a.rel_type = 'user_portrait_rel')"]} { ad_return_complaint 1 "
  • You shouldn't have gotten here; we don't have a portrait on file for you." return }