summary refs log tree commit diff
path: root/synapse/handlers/deactivate_account.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-07-18 18:05:29 +0100
committerDavid Baker <dave@matrix.org>2018-07-18 18:05:29 +0100
commit0476852fc6c517bb80fa9008f667d90171fe74e7 (patch)
tree00a2cf698f908bc320aff10388407c72964e668e /synapse/handlers/deactivate_account.py
parentMerge remote-tracking branch 'origin/master' into dinsic (diff)
downloadsynapse-0476852fc6c517bb80fa9008f667d90171fe74e7.tar.xz
Remove deactivated users from profile search
Diffstat (limited to 'synapse/handlers/deactivate_account.py')
-rw-r--r--synapse/handlers/deactivate_account.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py
index a84b7b8b80..88aa394427 100644
--- a/synapse/handlers/deactivate_account.py
+++ b/synapse/handlers/deactivate_account.py
@@ -32,6 +32,7 @@ class DeactivateAccountHandler(BaseHandler):
         self._device_handler = hs.get_device_handler()
         self._room_member_handler = hs.get_room_member_handler()
         self._identity_handler = hs.get_handlers().identity_handler
+        self._profile_handler = hs.get_profile_handler()
         self.user_directory_handler = hs.get_user_directory_handler()
 
         # Flag that indicates whether the process to part users from rooms is running
@@ -86,6 +87,9 @@ class DeactivateAccountHandler(BaseHandler):
 
         yield self.store.user_set_password_hash(user_id, None)
 
+        user = UserID.from_string(user_id)
+        yield self._profile_handler.set_active(user, False)
+
         # Add the user to a table of users pending deactivation (ie.
         # removal from all the rooms they're a member of)
         yield self.store.add_user_pending_deactivation(user_id)