summary refs log tree commit diff
path: root/synapse/handlers/admin.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-23 11:31:22 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-23 11:31:22 +0000
commit35d1ec2c8fcf33d63237576ada391c26af1ec5fc (patch)
tree3b6f3cf9819c6f96e4488062632082ee1eb20887 /synapse/handlers/admin.py
parent1.8.0 (diff)
parentAllow admin users to create or modify users without a shared secret (#6495) (diff)
downloadsynapse-35d1ec2c8fcf33d63237576ada391c26af1ec5fc.tar.xz
Allow admin users to create or modify users without a shared secret (#6495)
* commit 'd2906fe66':
  Allow admin users to create or modify users without a shared secret (#6495)
  Fixup changelog
Diffstat (limited to 'synapse/handlers/admin.py')
-rw-r--r--synapse/handlers/admin.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py

index 1a4ba12385..76d18a8ba8 100644 --- a/synapse/handlers/admin.py +++ b/synapse/handlers/admin.py
@@ -51,6 +51,15 @@ class AdminHandler(BaseHandler): return ret + async def get_user(self, user): + """Function to get user details""" + ret = await self.store.get_user_by_id(user.to_string()) + if ret: + profile = await self.store.get_profileinfo(user.localpart) + ret["displayname"] = profile.display_name + ret["avatar_url"] = profile.avatar_url + return ret + async def get_users(self): """Function to retrieve a list of users in users table.