summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-08-03 17:03:27 +0100
committerDavid Baker <dave@matrix.org>2015-08-03 17:03:27 +0100
commit7148aaf5d0f75c463c93ac69885d05160fee4d4a (patch)
treeaf34a293c9f580f0dd38558d962cca4f0ada1216 /synapse
parentAdd vector.im as trusted ID server (diff)
downloadsynapse-7148aaf5d0f75c463c93ac69885d05160fee4d4a.tar.xz
Don't try & check the username if we don't have one (which we won't if it's been saved in the auth layer)
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/client/v2_alpha/register.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py
index cf54e1dacf..b5926f9ca6 100644
--- a/synapse/rest/client/v2_alpha/register.py
+++ b/synapse/rest/client/v2_alpha/register.py
@@ -102,7 +102,8 @@ class RegisterRestServlet(RestServlet):
         if self.hs.config.disable_registration:
             raise SynapseError(403, "Registration has been disabled")
 
-        yield self.registration_handler.check_username(desired_username)
+        if desired_username is not None:
+            yield self.registration_handler.check_username(desired_username)
 
         if self.hs.config.enable_registration_captcha:
             flows = [