MarkLogic 10 Product Documentation
xdmp.getSessionField

xdmp.getSessionField(
   name as String,
   [default as Sequence]
) as Sequence

Summary

Returns the value of a named session field from the session created by the xdmp.login function.

Parameters
name The name of the session field.
default A default value to return if there is no session field.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-get-session-field

Usage Notes

You can use the xdmp.setSessionField function to set a named value in a session and the xdmp.getSessionFieldNames function to return the names of the fields in the session.

Example

xdmp.getSessionField("user");
=> "marklogic"
Powered by MarkLogic Server | Terms of Use | Privacy Policy