mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Fix Invitations on ONLY_SSO deploys (Zulip Enterprise)
(imported from commit 6807adbd39682ba91a5746e8a75d7ce53f632ab3)
This commit is contained in:
parent
b469066e66
commit
54d72d9a55
@ -487,7 +487,15 @@ def maybe_send_to_registration(request, email, full_name=''):
|
||||
if form.is_valid():
|
||||
# Construct a PreregistrationUser object and send the user over to
|
||||
# the confirmation view.
|
||||
prereg_user = create_preregistration_user(email, request)
|
||||
prereg_user = None
|
||||
if settings.ONLY_SSO:
|
||||
try:
|
||||
prereg_user = PreregistrationUser.objects.filter(email__iexact=email).latest("invited_at")
|
||||
except PreregistrationUser.DoesNotExist:
|
||||
prereg_user = create_preregistration_user(email, request)
|
||||
else:
|
||||
prereg_user = create_preregistration_user(email, request)
|
||||
|
||||
return redirect("".join((
|
||||
"/",
|
||||
# Split this so we only get the part after the /
|
||||
|
||||
Loading…
Reference in New Issue
Block a user