Loading TOC...

sec:get-user-names

sec:get-user-names(
   $user-ids as xs:unsignedLong*
) as element(sec:user-name)*

Summary

Returns sequence of unique sec:user-names that corresponds to the sequence of user IDs $user-ids. Duplicate IDs return a single name.

Parameters
$user-ids A sequence of user IDs.

Required Privileges

http://marklogic.com/xdmp/privileges/get-user-names

Usage Notes

If a user ID in $user-ids does not correspond to an existing user, an error is returned.

This function must be executed against the security database.

Example


(: execute this against the security database :)
xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
   "/MarkLogic/security.xqy";

sec:get-user-names((18325468190304151823, 
                    5673246250406350379, 
                    11765239768744971597))
=> 

<sec:user-name xmlns:sec="http://marklogic.com/xdmp/security">Jim</sec:user-name>
<sec:user-name xmlns:sec="http://marklogic.com/xdmp/security">Sue</sec:user-name>
<sec:user-name xmlns:sec="http://marklogic.com/xdmp/security">Tom</sec:user-name>
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.