person::get (public)

 person::get -person_id person_id [ -element element ]

Defined in packages/acs-tcl/tcl/community-core-procs.tcl

Get person information together with inherited party and object one. If person-only information is what you need, probably a better choice would be person::get_person_info.

Switches:
-person_id
(required)
-element
(optional)
if specified, only value in dict with this key will be returned.
Returns:
a dict or a single string value if -element was specified.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_person_procs_test person_procs_test (test acs-tcl) person::get person::get test_person_procs_test->person::get test_process_objects_csv process_objects_csv (test acs-tcl) test_process_objects_csv->person::get party::get party::get (public) person::get->party::get person::get_person_info person::get_person_info (public) person::get->person::get_person_info acs_user::get acs_user::get (public) acs_user::get->person::get acs_user::promote_person_to_user acs_user::promote_person_to_user (public) acs_user::promote_person_to_user->person::get packages/acs-subsite/www/shared/portrait.tcl packages/acs-subsite/ www/shared/portrait.tcl packages/acs-subsite/www/shared/portrait.tcl->person::get packages/acs-subsite/www/user/portrait/index.tcl packages/acs-subsite/ www/user/portrait/index.tcl packages/acs-subsite/www/user/portrait/index.tcl->person::get

Testcases:
person_procs_test, process_objects_csv
Source code:
    set data [party::get -party_id $person_id]
    # no party found = no user
    if {[llength $data] == 0} {
        return [list]
    }

    # query person info only if we don't have what was asked for already
    if {$element eq "" || ![dict exists $data $element]} {
        lappend data {*}[person::get_person_info -person_id $person_id]
    }

    if {$element ne ""} {
        set data [expr {[dict exists $data $element] ?
                        [dict get $data $element] : ""}]
    }

    return $data
Generic XQL file:
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

[ hide source ] | [ make this the default ]
Show another procedure: