Remove all sessions on password reset.
This commit is contained in:
parent
b2ed4247df
commit
93ae21cee6
1 changed files with 12 additions and 0 deletions
|
|
@ -1245,6 +1245,18 @@ routes:
|
|||
""",
|
||||
password, salt, @"nick"
|
||||
)
|
||||
|
||||
# Remove all sessions.
|
||||
exec(
|
||||
db,
|
||||
sql"""
|
||||
delete from session where userid = (
|
||||
select id from person
|
||||
where name = ?
|
||||
)
|
||||
""",
|
||||
@"nick"
|
||||
)
|
||||
resp Http200, "{}", "application/json"
|
||||
except ForumError as exc:
|
||||
resp Http400, $(%exc.data),"application/json"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue