Loading TOC...

MarkLogic Server 11.0 Product Documentation
sec.userSetPasswordExtra

sec.userSetPasswordExtra(
   user-name as String,
   extra as element(sec.passwordExtra)
) as null

Summary

This function sets extra information for the specified user. If the user does not exist, an exception is thrown.

Parameters
user-name The name of the user for whom to set the extra information.
extra The extra information to be set for the user.

Example


  // execute this against the security database
  // This function needs a XML element as an argument

  declareUpdate();
  const sec = require('/MarkLogic/security.xqy');
  const x = new NodeBuilder();

  x.startElement("sec:password-extra","http://marklogic.com/xdmp/security");
  x.startElement("p");
  x.addText("Change this password in 30 days");
  x.endElement();
  x.endElement();

  const extra = x.toNode();

  sec.userSetPasswordExtra("Jim", extra);

   

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