from social_auth.models import UserSocialAuth
from social_auth.store import DjangoOpenIDStore
-from social_auth.signals import pre_update, socialauth_registered
+from social_auth.signals import pre_update, socialauth_registered, \
+ socialauth_not_registered
# OpenID configuration
except UserSocialAuth.DoesNotExist:
if user is None: # new user
if not CREATE_USERS or not kwargs.get('create_user', True):
+ # Send signal for cases where tracking failed registering
+ # is useful.
+ socialauth_not_registered.send(uid=uid, response=response,
+ details=details)
return None
email = details.get('email')
"""Signals"""
from django.dispatch import Signal
-# Pre save signal
+# Pre update signal
# This signal is sent when user instance is about to be updated with
# new values from services provided. This way custom actions can be
# attached and values updated if needed before the saving time.
pre_update = Signal(providing_args=['user', 'response', 'details'])
socialauth_registered = Signal(providing_args=['user', 'response', 'details'])
+
+socialauth_not_registered = Signal(providing_args=['uid', 'response', 'details'])