auth fix
This commit is contained in:
parent
e184874163
commit
94d13bb245
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user