party::get (public)

 party::get [ -party_id party_id ] [ -email email ] \
    [ -element element ]

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

Returns party information. Will also retrieve whether this party is also a person, a group, a user or a registered user and in this case also extra information belonging in referenced table will be extracted.

Switches:
-party_id (optional)
id of the party
-email (optional)
if specified and no party_id is given, party lookup will happen by email.
-element (optional)
if specified, only this attribute will be returned from the whole dict.
Returns:
dict containing party information, or an empty dict if no party was found. A string if 'element' was specified.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_subsite_test_email_confirmation acs_subsite_test_email_confirmation (test acs-subsite) party::get party::get test_acs_subsite_test_email_confirmation->party::get party::get_by_email party::get_by_email (public) party::get->party::get_by_email party::get_not_cached party::get_not_cached (private) party::get->party::get_not_cached acs::test::confirm_email acs::test::confirm_email (public) acs::test::confirm_email->party::get acs::test::user::create acs::test::user::create (public) acs::test::user::create->party::get acs_user::promote_person_to_user acs_user::promote_person_to_user (public) acs_user::promote_person_to_user->party::get auth::get_local_account auth::get_local_account (private) auth::get_local_account->party::get auth::get_local_account_status auth::get_local_account_status (public) auth::get_local_account_status->party::get

Testcases:
acs_subsite_test_email_confirmation
Source code:
    if {$party_id eq ""} {
        set party_id [party::get_by_email -email $email]
    }

    while {1} {
        set party_info [ns_cache eval party_info_cache $party_id {
            set party_info [party::get_not_cached -party_id $party_id]
            #
            # Don't cache results form invalid parties.
            #
            if {[llength $party_info] == 0} {
                break
            }
            return $party_info
        }]
        break
    }

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