Loading TOC...

sec:user-set-password

sec:user-set-password(
   $user-name as xs:string,
   $password as xs:string
) as empty-sequence()

Summary

Changes the password for the user identified by $user-name to $password.

Parameters
$user-name The name of the user.
$password The new password. If $password is the empty string, an error is returned.

Required Privileges

http://marklogic.com/xdmp/privileges/user-set-password if the currrent user is not $user-name.

Usage Notes

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:user-set-password("Jim", "temp")

(: Changes the password for the user, "Jim," to "temp." :)
   

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