# Copyright (C) 2026 BoundWare LLC. All rights reserved.
# SnacTrac is licensed under the Apache License, Version 2.0
# See Licenses/LICENSE.txt for details.


# Return cleaned users data for users window.
def clean_users(data_users):

    data_users_cleaned = [user.copy() for user in data_users]

    for user in data_users_cleaned:

        del user[3]

    data_users_cleaned = sorted(
        data_users_cleaned,
        key=lambda user: (user[0].lower(), user[1].lower(), user[2].lower()),
    )

    return data_users_cleaned
