auth fix
This commit is contained in:
parent
e184874163
commit
94d13bb245
@ -38,11 +38,11 @@ class User:
|
|||||||
for row in rows:
|
for row in rows:
|
||||||
user = User(Database.connection)._set_row_values(row)
|
user = User(Database.connection)._set_row_values(row)
|
||||||
if user.username == self.username:
|
if user.username == self.username:
|
||||||
|
self._set_row_values(row)
|
||||||
found_user = user
|
found_user = user
|
||||||
break
|
break
|
||||||
|
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
if found_user:
|
if found_user:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
@ -75,7 +75,7 @@ class User:
|
|||||||
password = ?,
|
password = ?,
|
||||||
role = ?
|
role = ?
|
||||||
WHERE id = ?
|
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()
|
self.connection.commit()
|
||||||
cur.close()
|
cur.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user