diff --git a/users/models.py b/users/models.py index 287cde2..0491a19 100644 --- a/users/models.py +++ b/users/models.py @@ -408,6 +408,9 @@ def populate_user(self, request, sociallogin, data): user = super().populate_user(request, sociallogin, data) # user.username = user.email[:30] + if UserRegistHistory.objects.filter(email=user.email).exists(): + return + if user.email is not None: name = user.email.split("@")[0] user.username = name