from xml.etree import cElementTree as eTree


def get_user_data(model):
    # type: (eTree) -> (str, eTree.XML)

    operator = model.find("Operator")
    if operator is None:
        return 0, None

    user_id = operator.get("id")
    user_level = int(operator.get("level", 0))

    return user_level, user_id
