<apidoc:module name="LastLogin" category="Extension" lib="xdmp" xmlns:apidoc="http://marklogic.com/xdmp/apidoc"><apidoc:function name="user-last-login" type="builtin" lib="xdmp" category="Extension" subcategory="Extension" hidden="false" bucket="MarkLogic Built-In Functions">
    <apidoc:summary>
  Returns the last-login node for the specified user ID. If no user
  ID is specified, then the current user is assumed.  If no last-login
  database is specified in the App Server configuration, then the empty
  sequence is returned.
</apidoc:summary>
    <apidoc:params>
      <apidoc:param name="user" type="xs:unsignedLong" optional="false">
    A user ID.
  </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(last-login)?</apidoc:return>
    <apidoc:example><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
  xdmp:user-last-login(xdmp:user("sylvester"))
  =&gt; 
  &lt;last-login xmlns="http://marklogic.com/xdmp/last-login"&gt;
    &lt;user-id&gt;1134406269933351074&lt;/user-id&gt;
    &lt;last-successful-login&gt;2008-03-19T15:41:08&lt;/last-successful-login&gt;
    &lt;last-unsuccessful-login&gt;2008-03-19T15:40:45&lt;/last-unsuccessful-login&gt;
    &lt;number-unsuccessful-logins&gt;0&lt;/number-unsuccessful-logins&gt;
    &lt;display-last-login&gt;true&lt;/display-last-login&gt;
  &lt;/last-login&gt; 
</pre></apidoc:example>
    <algorithm xmlns="http://www.w3.org/1999/xhtml"></algorithm>
  </apidoc:function></apidoc:module>