mirror of
https://github.com/iv-org/invidious.git
synced 2024-10-01 01:35:38 -04:00
Clear session ids when deleting an account
This commit is contained in:
parent
06076c683f
commit
f647f7bdea
@ -1664,6 +1664,7 @@ post "/delete_account" do |env|
|
||||
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
|
||||
PG_DB.exec("DROP MATERIALIZED VIEW #{view_name}")
|
||||
PG_DB.exec("DELETE FROM users * WHERE email = $1", user.email)
|
||||
PG_DB.exec("DELETE FROM session_ids * WHERE email = $1", user.email)
|
||||
|
||||
env.request.cookies.each do |cookie|
|
||||
cookie.expires = Time.new(1990, 1, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user