mirror of https://github.com/zulip/zulip.git
log_into_subdomain: User should be None in signup.
This commit is contained in:
parent
5019b53492
commit
11426a2cec
|
@ -392,6 +392,12 @@ def log_into_subdomain(request):
|
|||
email_address = data['email']
|
||||
full_name = data['name']
|
||||
is_signup = data['is_signup']
|
||||
if is_signup:
|
||||
# If we are signing up, user_profile should be None. In case
|
||||
# email_address already exists, user will get an error message.
|
||||
user_profile = None
|
||||
return_data = {} # type: Dict[str, Any]
|
||||
else:
|
||||
user_profile, return_data = authenticate_remote_user(request, email_address)
|
||||
invalid_subdomain = bool(return_data.get('invalid_subdomain'))
|
||||
return login_or_register_remote_user(request, email_address, user_profile,
|
||||
|
|
Loading…
Reference in New Issue