auth::sync::get_sync_elements (private)

 auth::sync::get_sync_elements [ -user_id user_id ] \
    [ -authority_id authority_id ]

Defined in packages/acs-authentication/tcl/sync-procs.tcl

Get a Tcl list of the user profile elements controlled by the batch synchronization. These should not be editable by the user. Supply either user_id or authority_id. Authority_id is the most efficient.

Switches:
-user_id
(optional)
-authority_id
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/lib/user-info.tcl packages/acs-subsite/ lib/user-info.tcl auth::sync::get_sync_elements auth::sync::get_sync_elements packages/acs-subsite/lib/user-info.tcl->auth::sync::get_sync_elements acs_user::get_element acs_user::get_element (public) auth::sync::get_sync_elements->acs_user::get_element ad_log ad_log (public) auth::sync::get_sync_elements->ad_log ad_try ad_try (public) auth::sync::get_sync_elements->ad_try auth::sync::GetElements auth::sync::GetElements (private) auth::sync::get_sync_elements->auth::sync::GetElements

Testcases:
No testcase defined.
Source code:
    if { $authority_id eq "" } {
        if { $user_id eq "" } {
            error "You must supply either user_id or authority_id"
        }
        set authority_id [acs_user::get_element -user_id $user_id -element authority_id]
    }

    #
    # Try to sync. Many authorities do no support auth_sync_process,
    # but these will issue an exception below.
    #
    # TODO: using a different error-code could make the code saver, by
    # just ignoring such cases.
    #
    set elms [list]
    ad_try  {
        set elms [auth::sync::GetElements -authority_id $authority_id]
    } trap {AD EXCEPTION NO_AUTH_SYNC} {} {
        # authentication does not support auth_sync_process"
        ns_log notice "authentication of authority_id $authority_id does not support auth_sync_process"
    } on error {errorMsg dict} {
        ad_log error "auth::sync::GetElements raised: $errorMsg ($dict)"
    }

    return $elms
Generic XQL file:
packages/acs-authentication/tcl/sync-procs.xql

PostgreSQL XQL file:
packages/acs-authentication/tcl/sync-procs-postgresql.xql

Oracle XQL file:
packages/acs-authentication/tcl/sync-procs-oracle.xql

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