<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.user.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.user</api:function-name><api:suggest>xdmp.user</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>user</api:suggest><api:function-link mode="xquery" fullname="xdmp:user">/apidoc/8.0/xdmp:user.xml</api:function-link><api:function mode="javascript" name="user" type="builtin" lib="xdmp" category="Security" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.user"><api:summary>
  Returns the user ID for the specified user name.  Unlike the security
  library module function <code xmlns="http://www.w3.org/1999/xhtml">sec:uid-for-name</code>, this function
  can be evaluted against any database and does not need to be evaluated
  directly against the security database.  It returns the user ID from the
  security database configured for the database in which the App Server
  evaluates against.
</api:summary><api:params><api:param name="user" type="xs:string"><api:param-description>
    A user name.
  </api:param-description><api:param-name>user</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="extSecId" type="xs:unsignedLong" optional="true"><api:param-description>
    An external security config ID. This is needed only for external user.
  </api:param-description><api:param-name>extSecId</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="secDbFirst" type="xs:boolean" optional="true"><api:param-description>
    A boolean value to specify whether to use security database first or not.
    If not specified, defaults to the current app server's setting,
    or true when running on the task server.
  </api:param-description><api:param-name>secDbFirst</api:param-name><api:param-type>Boolean</api:param-type></api:param></api:params><api:return>String</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.user("john", xdmp.externalSecurity("ldap-config"), false);
=&gt; 16291221516538572683
</pre></api:example></api:function></api:function-page>