summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/registration.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index 2e5eddd259..f230faa25e 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -292,6 +292,18 @@ class RegistrationStore(SQLBaseStore):
         defer.returnValue(None)
 
     @defer.inlineCallbacks
+    def get_all_user_ids(self):
+        """Returns all user ids registered on this homeserver"""
+        return self.runInteraction(
+            "get_all_user_ids",
+            self._get_all_user_ids_txn
+        )
+
+    def _get_all_user_ids_txn(self, txn):
+        txn.execute("SELECT name from users")
+        return [r[0] for r in txn.fetchall()]
+
+    @defer.inlineCallbacks
     def count_all_users(self):
         """Counts all users registered on the homeserver."""
         def _count_users(txn):