def METHOD_NAME():
    """
    # FIXME: move to /user-account PUT
    Updates the user's email address.
    Returns an error if:
    - the user is not logged in or token has expired (standard JWT errors)
    - any parameters are missing from the request
    - the new email address is not in a valid format
    - the new email address does match the address given in the confirmed email address field
    - the new email address is already in the db
    """
    request_body = request.get_json(force=True, silent=True)
    for param in ("newEmail", "confirmEmail", "password"):
        if param not in request_body:
            raise InvalidUsageError(
                message=f"{param} must be included in the request body."
            )
    new_email = request_body["newEmail"]
    confirm_email = request_body["confirmEmail"]
    password = request_body["password"]
    if not is_email_valid(new_email):
        raise InvalidUsageError(
            message="Cannot update email. Email is not formatted correctly."
        )
    if new_email != confirm_email:
        raise InvalidUsageError(
            message="Cannot update email. New email address and confirm new email address do not match."
        )
    if not current_user.check_password(password):
        raise UnauthorizedError(message="Cannot update email. Incorrect password.")
    user = Users.find_by_email(new_email)
    if user:
        raise ConflictError(
            message="Cannot update email. Email already exists in the database."
        )
    try:
        current_user.user_email = new_email
        db.session.commit()
    except SQLAlchemyError:  # pragma: no cover
        raise DatabaseError(
            message="Something went wrong while trying to update the email in the db."
        )
    response = {"message": "User email successfully updated."}
    return jsonify(response), 200