summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-21 11:45:43 +0100
committerErik Johnston <erik@matrix.org>2015-08-21 11:45:43 +0100
commitfd5ad0f00ec963e9722d9f5bbe526dc84038e408 (patch)
treef0e05422ef4f880b9b4f4eeece4624feffd3b528
parentWhen logging in fetch user by user_id case insensitively, *unless* there are ... (diff)
downloadsynapse-fd5ad0f00ec963e9722d9f5bbe526dc84038e408.tar.xz
Doc string
-rw-r--r--synapse/handlers/auth.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 058a0f416d..602c5bcd89 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -295,6 +295,12 @@ class AuthHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def _find_user_id_and_pwd_hash(self, user_id):
+        """Checks to see if a user with the given id exists. Will check case
+        insensitively, but will throw if there are multiple inexact matches.
+
+        Returns:
+            tuple: A 2-tuple of `(canonical_user_id, password_hash)`
+        """
         user_infos = yield self.store.get_users_by_id_case_insensitive(user_id)
         if not user_infos:
             logger.warn("Attempted to login as %s but they do not exist", user_id)