summary refs log tree commit diff
path: root/synapse/storage/registration.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-12-10 16:26:08 +0000
committerDavid Baker <dave@matrix.org>2015-12-10 16:26:08 +0000
commit21f135ba763a583ecf9ba2714b5151f6b14b61fd (patch)
treeb7d2caeff94eb20bd167df49d0694e8f4168e65c /synapse/storage/registration.py
parentMerge pull request #432 from matrix-org/pushrules_refactor (diff)
downloadsynapse-21f135ba763a583ecf9ba2714b5151f6b14b61fd.tar.xz
Very first cut of calculating actions for events as they come in. Doesn't store them yet. Not very efficient.
Diffstat (limited to 'synapse/storage/registration.py')
-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):