mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-05 09:54:11 -04:00
Feature: Add deactivate account admin API
Allows server admins to "deactivate" accounts, which: - Revokes all access tokens - Removes all threepids - Removes password The API is a POST to `/admin/deactivate/<user_id>`
This commit is contained in:
parent
aac546c978
commit
f328d95cef
3 changed files with 40 additions and 0 deletions
|
@ -384,6 +384,15 @@ class RegistrationStore(SQLBaseStore):
|
|||
defer.returnValue(ret['user_id'])
|
||||
defer.returnValue(None)
|
||||
|
||||
def user_delete_threepids(self, user_id):
|
||||
return self._simple_delete(
|
||||
"user_threepids",
|
||||
keyvalues={
|
||||
"user_id": user_id,
|
||||
},
|
||||
desc="user_delete_threepids",
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def count_all_users(self):
|
||||
"""Counts all users registered on the homeserver."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue