
sec.removeUser( user-name as String ) as null
  Removes the user with name $user-name.
  If a user with name equal to $user-name is not found, an error is 
  returned.
  
| Parameters | |
|---|---|
| user-name | The name of a user. | 
http://marklogic.com/xdmp/privileges/remove-user
  This function must be executed against the security database.
declareUpdate();
 
const sec = require('/MarkLogic/security.xqy');
sec.removeUser("Jim")
 
// Removes the user, named Jim.   
  
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.