message: Hash password during user data updates,
diff: @@ -48,11 +48,16 @@ export class UserController {
  })
  .then((usernameInUse) => {
  if (typeof usernameInUse === 'undefined' || usernameInUse.length === 0) {
  + User.findById(id, {'new': true});
  return User.findByIdAndUpdate(id, user, {'new': true});
  } else {
  throw new HttpError(400, 'This username is already in use.');
  }
  })
  + .then((updatedUser) => {
  + updatedUser.markModified('password');
  + return updatedUser.save(user);
  + })
  .then((savedUser) => savedUser.toObject());
  }
  }
  