lib/models/users.js
function update(id, body, cb) {
  if(body.password) {
    crypto.encode(body.password, function(err, encoded) {
      if(err) { return cb(err); }
      body.password = encoded;
      _update(id, body, cb);
    });
  } else {
    _update(id, body, cb);
  }
}
function update(id, body, cb) {
  if(body.password) {
    crypto.encode(body.password, function(err, encoded) {
      if(err) { return cb(err); }
      body.password = encoded;
      _update(id, body, cb);
    });
  } else {
    _update(id, body, cb);
  }
}
function update ( id , body , cb ) { if ( body . password ) { crypto . encode ( body . password , function ( err , encoded ) { if ( err ) { return cb ( err ) ; } body . password = encoded ; _update ( id , body , cb ) ; } ) ; } else { _update ( id , body , cb ) ; } }
Updates user with `id`

`cb` is passed with the updated user or:
* exceptions.NotFound if the `id` is not found in the database
* exceptions.AlreadyExists if the `username` conflicts with another user

@param {Number} id
@param {Object} body
@param {Function} cb
Updates user with id