This commit is contained in:
Nick Leeman 2022-10-09 21:53:21 +02:00
parent e184874163
commit 94d13bb245

View File

@ -38,11 +38,11 @@ class User:
for row in rows:
user = User(Database.connection)._set_row_values(row)
if user.username == self.username:
self._set_row_values(row)
found_user = user
break
cur.close()
if found_user:
return True
else:
@ -75,7 +75,7 @@ class User:
password = ?,
role = ?
WHERE id = ?
""", (Encryption.encrypt(self.username), Encryption.encrypt(self.firstname), Encryption.encrypt(self.lastname), Encryption.encrypt(self.address), Encryption.encrypt(self.zipcode), self.city_id, Encryption.encrypt(self.email), Encryption.encrypt(self.phone), self.password, self.role, self.id))
""", (Encryption.encrypt(self.username), Encryption.encrypt(self.firstname), Encryption.encrypt(self.lastname), Encryption.encrypt(self.address), Encryption.encrypt(self.zipcode), self.city_id, Encryption.encrypt(self.email), Encryption.encrypt(self.phone), Encryption.encrypt(self.password), self.role, self.id))
self.connection.commit()
cur.close()