summary refs log tree commit diff
path: root/synapse/handlers/admin.py
diff options
context:
space:
mode:
authorManuel Stahl <37705355+awesome-manuel@users.noreply.github.com>2020-01-09 14:31:00 +0100
committerRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-01-09 13:31:00 +0000
commitd2906fe6667d3384f37ef03ca87172d643d49587 (patch)
tree3faae532d8f4a6c0de86c6cdf8c0a5ac3086680e /synapse/handlers/admin.py
parentMerge branch 'master' into develop (diff)
downloadsynapse-d2906fe6667d3384f37ef03ca87172d643d49587.tar.xz
Allow admin users to create or modify users without a shared secret (#6495)
Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de>
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.