diff --git a/src/helpers/account_helper.rs b/src/helpers/account_helper.rs index 21c2bfa..b35c869 100644 --- a/src/helpers/account_helper.rs +++ b/src/helpers/account_helper.rs @@ -1,5 +1,6 @@ use crate::constants::{PASSWORD_RESET_TOKEN_LENGTH, PASSWORD_RESET_TOKEN_LIFETIME}; use crate::constants::database_tables_names::{USER_ACCESS_TOKENS_TABLE, USERS_TABLE}; +use crate::controllers::user_ws_controller; use crate::data::account_export::AccountExport; use crate::data::api_client::APIClient; use crate::data::error::{ExecError, ResultBoxError}; @@ -302,7 +303,8 @@ pub fn export(user_id: &UserID) -> ResultBoxError { /// Delete a user's account pub fn delete(user_id: &UserID) -> ResultBoxError { - // TODO : close all websockets of user + // Close all WebSockets of user + user_ws_controller::disconnect_user_from_all_sockets(user_id)?; // Delete all group membership groups_helper::delete_all_user_groups(user_id)?;