MarkLogic 12 EA 1 Product Documentation
xdmp.getRequestUser

xdmp.getRequestUser() as (Number|String)

Summary

If this App Server is using application-level authentication, returns the ID of the user in the last successful call to xdmp.login. Otherwise, returns the ID of the user from the Authorization header of this App Server request. If you want to get the ID of the current user, use the xdmp.getCurrentUserid function.

Example

xdmp.getRequestUser();
=> 23987236
Powered by MarkLogic Server | Terms of Use | Privacy Policy