docs: function (user) {
    if (user.id)
      return {_id: user.id};
    else if (user.username)
      return {username: user.username};
    else if (user.email)
      return {"emails.address": user.email};
    throw new Error("shouldn't happen (validation missed something)");
  }