Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MO-P
Odevzdávací Systém MO
Commits
952a5942
Commit
952a5942
authored
Dec 29, 2020
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
TODO: Reset hesla
parent
d43a3ae4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
TODO
+1
-0
1 addition, 0 deletions
TODO
mo/users.py
+1
-0
1 addition, 0 deletions
mo/users.py
with
2 additions
and
0 deletions
TODO
+
1
−
0
View file @
952a5942
- 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 ###
...
...
This diff is collapsed.
Click to expand it.
mo/users.py
+
1
−
0
View file @
952a5942
...
@@ -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
()))):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment