Loading TOC...

xdmp.user

xdmp.user(
   $user as String,
   [$extSecId as String],
   [$secDbFirst as Boolean]
) as String

Summary

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.

Parameters
$user A user name.
$extSecId An external security config ID to search. This is needed only to find an external user. The default is the current App Server's external-security setting.
$secDbFirst A boolean value to specify whether to check security database before any specified external security. The default is the current App Server's internal-security setting, or true when running on the task server.

Example

// assume no external security is configured 
xdmp:user("sylvester")
=> 239871567325

Example

xdmp.user("john", xdmp.externalSecurity("ldap-config"), false);
=> 16291221516538572683

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy