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


import sqlite3


# Add new user to database.
def append_users(name_first, name_last, username, password):

    conn = sqlite3.connect(database="Data/Database.db")

    cur = conn.cursor()

    cur.execute(
        """
        INSERT INTO Users ("First Name", "Last Name", "Username", "Password")
        VALUES (?, ?, ?, ?)
        """,
        (name_first, name_last, username, password),
    )

    conn.commit()

    cur.close()

    conn.close()
