Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Commit

Permalink
Fix issue that very sporadically, ovewrote most of the fields of a fr…
Browse files Browse the repository at this point in the history
…esh user.
  • Loading branch information
fpereiro committed May 18, 2021
1 parent 4fc078a commit 441ccac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ def signup ():
'password': hashed,
'email': email,
'created': timems (),
'verification_pending': hashed_token
'verification_pending': hashed_token,
'last_login': timems ()
}

if 'country' in body:
Expand All @@ -207,7 +208,6 @@ def signup ():
# We automatically login the user
cookie = make_salt ()
db_set ('tokens', {'id': cookie, 'username': user ['username'], 'ttl': times () + session_length})
db_set ('users', {'username': user ['username'], 'last_login': timems ()})

# If on local environment, we return email verification token directly instead of emailing it, for test purposes.
if not env:
Expand Down

0 comments on commit 441ccac

Please sign in to comment.