xdmp:user( $user as xs:string, [$extSecId as xs:unsignedLong], [$secDbFirst as xs:boolean] ) as xs:unsignedLong
Returns the user ID for the specified user name. Unlike the security
library module function
sec:uid-for-name
,
this function
can be evaluated against any database and does not need to be evaluated
directly against the security database. It returns the user ID either from
the security database or from the specified external security, depending on
the parameter values.
(: assume no external security is configured :) xdmp:user("sylvester") => 239871567325
(: searches for "sylvester" in the external security configured, without looking in the security database :) xdmp:user("sylvester", xdmp:external-security("ldap-config"), fn:false()) => 239871567325