Skip to content

Commit

Permalink
Add pre_social_login signal receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
wlorenzetti committed Dec 17, 2024
1 parent 5cba175 commit 142c902
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions g3w-admin/usersmanage/receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from django_registration.signals import user_registered
from django.template.loader import render_to_string
from django.contrib.sites.shortcuts import get_current_site
from allauth.socialaccount.signals import pre_social_login
from usersmanage.models import Userbackend, USER_BACKEND_DEFAULT, Group as AuthGroup, Userdata
from usersmanage.configs import G3W_VIEWER1
from usersmanage.signals import after_save_user_form
Expand Down Expand Up @@ -104,3 +105,9 @@ def send_email_to_user(sender, **kwargs):
)

user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL, fail_silently=True)

@receiver(pre_social_login)
def profile_user(sender, **kwargs):

print(kwargs)
return

0 comments on commit 142c902

Please sign in to comment.