ad_get_client_property (public)

 ad_get_client_property [ -cache cache ] [ -cache_only cache_only ] \
    [ -default default ] [ -session_id session_id ] module name

Defined in packages/acs-tcl/tcl/security-procs.tcl

Looks up a property for a session. If -cache is true, will use the cached value if available. If -cache_only is true, will never incur a database hit (i.e., will only return a value if cached). If the property is secure, we must be on a validated session over HTTPS or the default is returned.

(defaults to "t") (optional)
(defaults to "f") (optional)
controls which session is used
module - typically the name of the package to which the property belongs (serves as a namespace)
name - name of the property
value of the property or default
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_client_properties client_properties (test acs-tcl) ad_get_client_property ad_get_client_property test_client_properties->ad_get_client_property ad_conn ad_conn (public) ad_get_client_property->ad_conn sec_session_timeout sec_session_timeout ad_get_client_property->sec_session_timeout security::secure_conn_p security::secure_conn_p (public) ad_get_client_property->security::secure_conn_p util_memoize util_memoize (public) ad_get_client_property->util_memoize util_memoize_cached_p util_memoize_cached_p (public) ad_get_client_property->util_memoize_cached_p Class ::xowiki::Mode Class ::xowiki::Mode (public) Class ::xowiki::Mode->ad_get_client_property ad_cache_returnredirect ad_cache_returnredirect (public) ad_cache_returnredirect->ad_get_client_property ad_page_contract ad_page_contract (public) ad_page_contract->ad_get_client_property apidoc::set_public apidoc::set_public (private) apidoc::set_public->ad_get_client_property apm_get_package_repository apm_get_package_repository (public) apm_get_package_repository->ad_get_client_property

Source code:
    if { $session_id eq "" } {
        set id [ad_conn session_id]
        # If session_id is still undefined in the connection then just
        # return the default of the property.
        if { $id eq "" } {
            return $default
    } else {
        set id $session_id

    set cmd [list sec_lookup_property_not_cached $id $module $name]

    if { $cache_only == "t" && ![util_memoize_cached_p $cmd] } {
        return $default

    if { $cache != "t" } {
        util_memoize_flush $cmd

    set property [util_memoize $cmd [sec_session_timeout]]
    if { $property eq "" } {
        return $default
    lassign $property value secure_p

    if { $secure_p != "f" && !([security::secure_conn_p] || [ad_conn behind_secure_proxy_p]) } {
        return $default

    return $value
Generic XQL file:

PostgreSQL XQL file:

Oracle XQL file:

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