Remove all sessions on password reset.

This commit is contained in:
Dominik Picheta 2018-05-20 17:36:39 +01:00
commit 93ae21cee6

View file

@ -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"