update ui related files & functions

This commit is contained in:
WorldTeacher
2024-01-31 15:31:25 +01:00
parent 4ff37d9452
commit c03865dcbd
5 changed files with 259 additions and 205 deletions

View File

@@ -71,7 +71,7 @@ class Ui_Dialog(object):
hashed_password = hashlib.sha256(
password.encode()
).hexdigest()
if len(db.get_users()) == 0:
if len(db.getUsers()) == 0:
AdminCommands().create_admin()
self.lresult = 1 # Indicate successful login
self.lusername = username
@@ -80,7 +80,6 @@ class Ui_Dialog(object):
self.lresult = 1 # Indicate successful login
self.lusername = username
self.dialog.accept()
db.close()
else:
# Credentials are invalid, display a warning
if username == "" or password == "":