acs_user::get_user_info (public)

 acs_user::get_user_info -user_id user_id [ -element element ]

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

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

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

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_subsite_test_email_confirmation acs_subsite_test_email_confirmation (test acs-subsite) acs_user::get_user_info acs_user::get_user_info test_acs_subsite_test_email_confirmation->acs_user::get_user_info test_auth_authenticate auth_authenticate (test acs-authentication) test_auth_authenticate->acs_user::get_user_info test_auth_email_on_password_change auth_email_on_password_change (test acs-authentication) test_auth_email_on_password_change->acs_user::get_user_info test_sync_actions sync_actions (test acs-authentication) test_sync_actions->acs_user::get_user_info test_sync_batch_ims_test sync_batch_ims_test (test acs-authentication) test_sync_batch_ims_test->acs_user::get_user_info acs_user::change_state acs_user::change_state (public) acs_user::change_state->acs_user::get_user_info acs_user::flush_user_info acs_user::flush_user_info (public) acs_user::flush_user_info->acs_user::get_user_info acs_user::get acs_user::get (public) acs_user::get->acs_user::get_user_info acs_user::registered_user_p acs_user::registered_user_p (public) acs_user::registered_user_p->acs_user::get_user_info auth::authenticate auth::authenticate (public) auth::authenticate->acs_user::get_user_info

Testcases:
auth_authenticate, auth_email_on_password_change, sync_actions, sync_batch_ims_test, acs_subsite_test_email_confirmation
Source code:
    set key [list get_user_info $user_id]

    while {1} {
        set user_info [ns_cache eval user_info_cache $key {
            set user_info [acs_user::get_user_info_not_cached -user_id $user_id]
            #
            # Don't cache results from lookups of invalid users.
            #
            if {[llength $user_info] == 0} {
                break
            }
            return $user_info
        }]
        break
    }

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