<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.getRequestUser.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.getRequestUser</api:function-name><api:suggest>xdmp.getrequestuser</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>getrequestuser</api:suggest><api:function-link mode="xquery" fullname="xdmp:get-request-user">/apidoc/8.0/xdmp:get-request-user.xml</api:function-link><api:function mode="javascript" name="getRequestUser" type="builtin" lib="xdmp" category="Security" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.getRequestUser"><api:summary>
  If this App Server is using application-level authentication, 
  returns the ID of the user in the last successful call to 
  <a href="./xdmp:login" xmlns="http://www.w3.org/1999/xhtml"><code>xdmp:login</code></a>.
  Otherwise, returns the ID of the user from the <code xmlns="http://www.w3.org/1999/xhtml">Authorization</code> 
  header of this App Server request.
  If you want to get the ID of the current user, use the 
  <a href="./xdmp:get-current-userid" xmlns="http://www.w3.org/1999/xhtml"><code>xdmp:get-current-userid</code></a> 
  function.
</api:summary><api:params/><api:return>String</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.getRequestUser();
=&gt; 23987236
</pre></api:example></api:function></api:function-page>