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 -r1.75 -r1.76 --- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 26 May 2018 16:40:38 -0000 1.75 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 28 May 2018 12:29:03 -0000 1.76 @@ -58,12 +58,11 @@ } { get info for a person as a Tcl array in list form } { - db_1row get_person {} - - set person(person_id) $person_id - set person(first_names) $first_names - set person(last_name) $last_name - + db_1row get_person { + select * from persons + where person_id = :person_id + } -column_array person + set person(person_name) "$person(first_names) $person(last_name)" return [array get person] } @@ -98,13 +97,11 @@ } { get the name of a person } { - if {$email eq ""} { - db_1row get_person_name {} - } else { - # As the old functionality returned an error, but I want an empty string for e-mail - # Therefore for emails we use db_string - set person_name [db_string get_party_name {} -default ""] + if {$person_id eq ""} { + set person_id [party::get_by_email -email $email] } + set person [dict create {*}[person::get -person_id $person_id]] + set person_name [dict get $person person_name] return $person_name } @@ -151,7 +148,8 @@ upvar $exists_var exists_p } - db_1row select_bio {} + set person [dict create {*}[person::get -person_id $person_id]] + set bio [dict get $person bio] set exists_p [expr {$bio ne ""}] Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.xql,v diff -u -r1.30 -r1.31 --- openacs-4/packages/acs-tcl/tcl/community-core-procs.xql 25 May 2018 08:43:17 -0000 1.30 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs.xql 28 May 2018 12:29:03 -0000 1.31 @@ -1,16 +1,6 @@ - - - - select first_names, last_name - from persons - where person_id = :person_id - - - - @@ -32,44 +22,13 @@ - - - - select distinct first_names||' '||last_name as person_name - from persons - where person_id = :person_id - - - - - - - - select distinct first_names||' '||last_name as person_name - from persons, parties - where person_id = party_id - and email = :email - - - - - - - - select bio - from persons - where person_id = :person_id - - - update persons set bio = :bio where person_id = :person_id -