Skip to content

Commit

Permalink
Update userManagement.py
Browse files Browse the repository at this point in the history
  • Loading branch information
benpaddlejones authored Oct 24, 2024
1 parent b95e7d0 commit 91e0ffb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions userManagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ def retrieveUsers(username, password):
return False
else:
cur.execute(f"SELECT * FROM users WHERE password = '{password}'")
if cur.fetchone() == None:
with open("visitor_log.txt", "r") as file:
# Plain text log of visitor count as requested by Unsecure PWA management
with open("visitor_log.txt", "r") as file:
number = int(file.read().strip())
number += 1
with open("visitor_log.txt", "w") as file:
file.write(str(number))
con.close()
if cur.fetchone() == None:
return False
else:
con.close()
Expand Down

0 comments on commit 91e0ffb

Please sign in to comment.