Skip to content
Snippets Groups Projects
Commit 952a5942 authored by Martin Mareš's avatar Martin Mareš
Browse files

TODO: Reset hesla

parent d43a3ae4
Branches
No related tags found
No related merge requests found
- nastavit cestu k cookies - nastavit cestu k cookies
- dodělat reset hesla, posílat maily
### Dořešit v importu škol ### ### Dořešit v importu škol ###
......
...@@ -60,6 +60,7 @@ def check_reset_password(token: str) -> Optional[db.User]: ...@@ -60,6 +60,7 @@ def check_reset_password(token: str) -> Optional[db.User]:
if not fields or len(fields) != 2: if not fields or len(fields) != 2:
return None return None
user = db.get_session().query(db.User).filter_by(user_id=int(fields[0])).first() user = db.get_session().query(db.User).filter_by(user_id=int(fields[0])).first()
# FIXME: Zkontrolovat, jestli požadavek není moc starý
if (user if (user
and user.reset_at is not None and user.reset_at is not None
and fields[1] == str(int(user.reset_at.timestamp()))): and fields[1] == str(int(user.reset_at.timestamp()))):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment