diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2019-11-28 10:40:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-28 10:40:42 +0000 |
commit | a9c44d4008deb29503e2de00e5aae1a56a72d630 (patch) | |
tree | 554b12c97ada0a2f8209b1cee8a1a5819e228acb /synapse/storage | |
parent | Clarifications for the email configuration settings. (#6423) (diff) | |
download | synapse-a9c44d4008deb29503e2de00e5aae1a56a72d630.tar.xz |
Remove local threepids on account deactivation (#6426)
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/data_stores/main/registration.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/storage/data_stores/main/registration.py b/synapse/storage/data_stores/main/registration.py index 0a3c1f0510..98cf6427c3 100644 --- a/synapse/storage/data_stores/main/registration.py +++ b/synapse/storage/data_stores/main/registration.py @@ -569,6 +569,19 @@ class RegistrationWorkerStore(SQLBaseStore): return self._simple_delete( "user_threepids", keyvalues={"user_id": user_id, "medium": medium, "address": address}, + desc="user_delete_threepid", + ) + + def user_delete_threepids(self, user_id: str): + """Delete all threepid this user has bound + + Args: + user_id: The user id to delete all threepids of + + """ + return self._simple_delete( + "user_threepids", + keyvalues={"user_id": user_id}, desc="user_delete_threepids", ) |