From 959a9d8a5edeea1de883f3c189aae3ff6806b644 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 5 Feb 2021 13:32:07 +0100 Subject: [PATCH] Close user websockets when he destroy all its access tokens --- src/helpers/account_helper.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/helpers/account_helper.rs b/src/helpers/account_helper.rs index b35c869..3f1bb18 100644 --- a/src/helpers/account_helper.rs +++ b/src/helpers/account_helper.rs @@ -117,6 +117,8 @@ pub fn destroy_login_tokens(id: &UserID, client: &APIClient) -> ResultBoxError<( /// Destroy all login tokens of a user pub fn destroy_all_user_tokens(id: &UserID) -> ResultBoxError { + user_ws_controller::disconnect_user_from_all_sockets(id)?; + database::DeleteQuery::new(USER_ACCESS_TOKENS_TABLE) .cond_user_id("user_id", id) .exec()