title: Mongoose: Find, modify, save
body: <p>I have a Mongoose <code>User</code> model:</p>
  
  <pre><code>var User = mongoose.model('Users',
      mongoose.Schema({
          username: 'string',
          password: 'string',
          rights: 'string'
      })
  );
  </code></pre>
  
  <p>I want to find one instance of the <code>User</code> model, modify it's properties, and save the changes. This is what I have tried (it's wrong!):</p>
  
  <pre><code>User.find({username: oldUsername}, function (err, user) {
      user.username = newUser.username;
      user.password = newUser.password;
      user.rights = newUser.rights;
  
      user.save(function (err) {
          if(err) {
              console.error('ERROR!');
          }
      });
  });
  </code></pre>
  
  <p>What is the syntax to find, modify and save an instance of the <code>User</code> model?</p>