person::update (public)
person::update -person_id person_id [ -first_names first_names ] \ [ -last_name last_name ] [ -bio bio ]
Defined in packages/acs-tcl/tcl/community-core-procs.tcl
Update person information.
- Switches:
- -person_id (required)
- -first_names (optional)
- -last_name (optional)
- -bio (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- person_procs_test
Source code: set cols [list] foreach var {first_names last_name bio} { if { [info exists $var] } { lappend cols "$var = :$var" } } if {[llength $cols] == 0} { return } db_dml update_person {} # update object title if changed if {[info exists first_names] || [info exists last_name]} { db_dml update_object_title {} # need to flush also objects attributes for the party person::flush_cache -person_id $person_id } else { # only need to flush person information (e.g. bio) person::flush_person_info -person_id $person_id }Generic XQL file: <fullquery name="person::update.update_person"> <querytext> update persons set [join $cols ", "] where person_id = :person_id </querytext> </fullquery> <fullquery name="person::update.update_object_title"> <querytext> update acs_objects set title = :first_names || ' ' || :last_name where object_id = :person_id </querytext> </fullquery>packages/acs-tcl/tcl/community-core-procs.xql
PostgreSQL XQL file: packages/acs-tcl/tcl/community-core-procs-postgresql.xql
Oracle XQL file: packages/acs-tcl/tcl/community-core-procs-oracle.xql