diff options
author | David Baker <dave@matrix.org> | 2015-08-03 17:03:27 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-08-03 17:03:27 +0100 |
commit | 7148aaf5d0f75c463c93ac69885d05160fee4d4a (patch) | |
tree | af34a293c9f580f0dd38558d962cca4f0ada1216 /synapse/rest | |
parent | Add vector.im as trusted ID server (diff) | |
download | synapse-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/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/register.py | 3 |
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 = [ |