Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle case where a user skips email confirmation

In DUA, if you are invited to a site and you end
up signing up with the same email address, DUA will
skip the confirmation cycle and count it as
confirmed already.
  • Loading branch information...
commit c86569d46aac2372107a5e2af66208de8c4a4c1d 1 parent e63d7a8
Patrick Altman paltman authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 kaleo/receivers.py
12 kaleo/receivers.py
View
@@ -4,7 +4,7 @@
from django.contrib.auth.models import User
from account.models import SignupCodeResult, EmailConfirmation
-from account.signals import signup_code_used, email_confirmed
+from account.signals import signup_code_used, email_confirmed, user_signed_up
from kaleo.models import JoinInvitation, InvitationStat
@@ -28,6 +28,16 @@ def handle_email_confirmed(sender, **kwargs):
)
+@receiver(user_signed_up)
+def handle_user_signup(sender, user, form, **kwargs):
+ email_qs = user.emailaddress_set.filter(email=user.email, verified=True)
+ if user.is_active and email_qs.exists():
+ JoinInvitation.process_independent_joins(
+ user=user,
+ email=user.email
+ )
+
+
@receiver(post_save, sender=User)
def create_stat(sender, instance=None, **kwargs):
if instance is None:
Please sign in to comment.
Something went wrong with that request. Please try again.