summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-07-04 14:23:04 +0100
committerGitHub <noreply@github.com>2016-07-04 14:23:04 +0100
commit3de816834379664f7bc3dbf595a5187b5c0b8a51 (patch)
tree1f2556704b4e3157208f44f9a70c66581b43ec73 /synapse/handlers
parentcode_style.rst: add link to sphinx examples (diff)
parentFix style violations (diff)
downloadsynapse-3de816834379664f7bc3dbf595a5187b5c0b8a51.tar.xz
Merge pull request #905 from KentShikama/add-password-hash
Optionally include password hash in createUser endpoint
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/register.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index 0b7517221d..88c82ba7d0 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -358,7 +358,8 @@ class RegistrationHandler(BaseHandler):
         defer.returnValue(data)
 
     @defer.inlineCallbacks
-    def get_or_create_user(self, localpart, displayname, duration_seconds):
+    def get_or_create_user(self, localpart, displayname, duration_seconds,
+                           password_hash=None):
         """Creates a new user if the user does not exist,
         else revokes all previous access tokens and generates a new one.
 
@@ -394,7 +395,7 @@ class RegistrationHandler(BaseHandler):
             yield self.store.register(
                 user_id=user_id,
                 token=token,
-                password_hash=None,
+                password_hash=password_hash,
                 create_profile_with_localpart=user.localpart,
             )
         else: