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.
- Switches:
- -cache (optional, defaults to
"t"
)- -cache_only (optional, defaults to
"f"
)- -default (optional)
- -session_id (optional)
- controls which session is used
- Parameters:
- module (required)
- typically the name of the package to which the property belongs (serves as a namespace)
- name (required)
- name of the property
- Returns:
- value of the property or default
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- client_properties
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 $valueGeneric XQL file: packages/acs-tcl/tcl/security-procs.xql
PostgreSQL XQL file: packages/acs-tcl/tcl/security-procs-postgresql.xql
Oracle XQL file: packages/acs-tcl/tcl/security-procs-oracle.xql