person::get_person_info (public)

 person::get_person_info -person_id person_id [ -element element ]

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

Extracts person information. Differently from person::get this proc won't return generic party information.

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_demote_promote_a_user demote_promote_a_user (test acs-tcl) person::get_person_info person::get_person_info test_demote_promote_a_user->person::get_person_info person::get_person_info_not_cached person::get_person_info_not_cached (public) person::get_person_info->person::get_person_info_not_cached auth::password::email_password auth::password::email_password (private) auth::password::email_password->person::get_person_info person::get person::get (public) person::get->person::get_person_info person::get_bio person::get_bio (public) person::get_bio->person::get_person_info person::name person::name (public) person::name->person::get_person_info person::person_p person::person_p (public) person::person_p->person::get_person_info

Testcases:
demote_promote_a_user
Source code:
    while {1} {
        set person_info [ns_cache eval person_info_cache $person_id {
            set person_info [person::get_person_info_not_cached -person_id $person_id]
            #
            # Don't cache empty dicts for invalid person_ids.
            #
            if {[llength $person_info] == 0} {
                break
            }
            return $person_info
        }]
        break
    }

    if {$element ne ""} {
        return [expr {[dict exists $person_info $element] ?
                      [dict get $person_info $element] : ""}]
    } else {
        return $person_info
    }
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: