
sec:user-set-name( $user-name as xs:string, $new-user-name as xs:string, $password as xs:string ) as empty-sequence()
Changes the name of the user from $user-name to $new-user-name.
http://marklogic.com/xdmp/privileges/user-set-name if
the currrent user is not $user-name.
If a user with name equal to $user-name is not found, an error is returned.
If $new-user-name is not unique, an error is returned.
This function must be executed against the security database.
xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at
"/MarkLogic/security.xqy";
sec:user-set-name(
"William",
"Bill",
"temp")
(: Changes the username from "Wiiliam" to "Bill" and resets the password to
"temp". :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.