Use UserId to create FQ user id

This commit is contained in:
Steven Hammerton 2015-10-09 11:04:07 +01:00
parent 625e13bfde
commit e52f4dc599

View File

@ -133,7 +133,7 @@ class LoginRestServlet(ClientV1RestServlet):
for child in root[0]: for child in root[0]:
if child.tag.endswith("user"): if child.tag.endswith("user"):
user = child.text user = child.text
user_id = "@%s:%s" % (user, self.servername) user_id = UserID.create(user, self.hs.hostname).to_string()
auth_handler = self.handlers.auth_handler auth_handler = self.handlers.auth_handler
user_exists = yield auth_handler.does_user_exist(user_id) user_exists = yield auth_handler.does_user_exist(user_id)
if user_exists: if user_exists: