diff options
author | Erik Johnston <erik@matrix.org> | 2016-01-20 16:14:48 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-01-20 16:14:48 +0000 |
commit | c43b6dcc756c259e479c13d4f0802850d657fed6 (patch) | |
tree | f4e707953188c88ed6ef0e64e877659d120df53a /synapse | |
parent | Merge pull request #512 from matrix-org/erikj/whine_on_from (diff) | |
download | synapse-c43b6dcc756c259e479c13d4f0802850d657fed6.tar.xz |
Fix change_password
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/rest/client/v2_alpha/account.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py index fa56249a69..d507172704 100644 --- a/synapse/rest/client/v2_alpha/account.py +++ b/synapse/rest/client/v2_alpha/account.py @@ -56,10 +56,9 @@ class PasswordRestServlet(RestServlet): if LoginType.PASSWORD in result: # if using password, they should also be logged in requester = yield self.auth.get_user_by_req(request) - requester_user_id = requester.user.to_string() - if requester_user_id.to_string() != result[LoginType.PASSWORD]: + user_id = requester.user.to_string() + if user_id != result[LoginType.PASSWORD]: raise LoginError(400, "", Codes.UNKNOWN) - user_id = requester_user_id elif LoginType.EMAIL_IDENTITY in result: threepid = result[LoginType.EMAIL_IDENTITY] if 'medium' not in threepid or 'address' not in threepid: |