Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-8849

db.changeUserPassword() parameters are incorrect in documentation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None
    • 0.2

      https://docs.mongodb.com/v3.2/reference/method/db.changeUserPassword/

      Parameters are listed as username, password, mechanism, and digestPassword, but the shell disagrees.

      MongoDB shell version: 3.2.9
      connecting to: test
      > db.changeUserPassword
      function (username, password, writeConcern) {
      this.updateUser(username,

      {pwd: password}

      , writeConcern);
      }

      I checked previous versions and this is the code all the way back to 2.6.9. The code was slightly different in 2.4.14 as it didn't include the writeConcern parameter.

      Please correct the function definition to remove mechanism and digestPassword parameters and add the writeConcern parameter.

            Assignee:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Reporter:
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 29 weeks ago