From 142c9022ddd13b7c668f2a3114db1815a2852dc0 Mon Sep 17 00:00:00 2001 From: wlorenzetti Date: Tue, 17 Dec 2024 10:51:41 +0100 Subject: [PATCH] Add pre_social_login signal receiver --- g3w-admin/usersmanage/receivers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/g3w-admin/usersmanage/receivers.py b/g3w-admin/usersmanage/receivers.py index a07ffc399..fe1874448 100644 --- a/g3w-admin/usersmanage/receivers.py +++ b/g3w-admin/usersmanage/receivers.py @@ -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 @@ -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