Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
a9c44d40
Unverified
Commit
a9c44d40
authored
5 years ago
by
Andrew Morgan
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove local threepids on account deactivation (#6426)
parent
c48ea980
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changelog.d/6426.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/6426.bugfix
synapse/handlers/deactivate_account.py
+3
-0
3 additions, 0 deletions
synapse/handlers/deactivate_account.py
synapse/storage/data_stores/main/registration.py
+13
-0
13 additions, 0 deletions
synapse/storage/data_stores/main/registration.py
with
17 additions
and
0 deletions
changelog.d/6426.bugfix
0 → 100644
+
1
−
0
View file @
a9c44d40
Clean up local threepids from user on account deactivation.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
synapse/handlers/deactivate_account.py
+
3
−
0
View file @
a9c44d40
...
...
@@ -95,6 +95,9 @@ class DeactivateAccountHandler(BaseHandler):
user_id
,
threepid
[
"
medium
"
],
threepid
[
"
address
"
]
)
# Remove all 3PIDs this user has bound to the homeserver
yield
self
.
store
.
user_delete_threepids
(
user_id
)
# delete any devices belonging to the user, which will also
# delete corresponding access tokens.
yield
self
.
_device_handler
.
delete_all_devices_for_user
(
user_id
)
...
...
This diff is collapsed.
Click to expand it.
synapse/storage/data_stores/main/registration.py
+
13
−
0
View file @
a9c44d40
...
...
@@ -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
"
,
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment