diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-08-14 16:40:15 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-08-14 16:40:15 +0100 |
commit | fef3183461a60715cb5fb0638abcde335c61db82 (patch) | |
tree | d34d0aa0abee7536e19efd2bde8ddb637d7a1534 /synapse/handlers | |
parent | hs: Make /login accept full user IDs or just local parts. webclient: Only ena... (diff) | |
download | synapse-fef3183461a60715cb5fb0638abcde335c61db82.tar.xz |
Pass back the user_id in the response to /login in case it has changed. Store and use that on the webclient rather than the input field.
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/login.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/synapse/handlers/login.py b/synapse/handlers/login.py index 5c7d503a24..0220fa0604 100644 --- a/synapse/handlers/login.py +++ b/synapse/handlers/login.py @@ -16,7 +16,6 @@ from twisted.internet import defer from ._base import BaseHandler -from synapse.types import UserID from synapse.api.errors import LoginError, Codes import bcrypt @@ -36,7 +35,7 @@ class LoginHandler(BaseHandler): """Login as the specified user with the specified password. Args: - user (str): The user ID or username. + user (str): The user ID. password (str): The password. Returns: The newly allocated access token. @@ -48,9 +47,6 @@ class LoginHandler(BaseHandler): if not hasattr(self, "reg_handler"): self.reg_handler = self.hs.get_handlers().registration_handler - if not user.startswith('@'): - user = UserID.create_local(user, self.hs).to_string() - # pull out the hash for this user if they exist user_info = yield self.store.get_user_by_id(user_id=user) if not user_info: |