Commits

offline committed 2d26462

signals removed

  • Participants
  • Parent commits ec11a3a

Comments (0)

Files changed (4)

openauth/__init__.py

 from django.contrib.auth.models import User
 
 from openauth.models import SocialID
-from openauth import signals
 from openauth import settings
 from openauth import lang
 

openauth/backends/__init__.py

     def __init__(self, provider):
         self.provider = provider
         self._identity = None
-        self.errors = []
 
     def set_identity(self, identity):
         self._identity = identity

openauth/backends/openid.py

             raise Redirect(redirect_url)
 
         except discover.DiscoveryFailure:
-            self.errors.append(_('Could not find OpenID server'))
-            return self.errors
-
+            request.flash['error'] = _('Could not find OpenID server')
+            raise Redirect('openauth-social-login')
 
 
     def validate_response(self, request):

openauth/signals.py

-from django.contrib import auth 
-
-from annoying.decorators import signals
-from confirmation.models import Confirmation
-from confirmation.signals import successfull_confirmation
-
-from openauth import settings
-
-
-@signals(successfull_confirmation, sender=Confirmation)
-def sighandler(request, instance, confirmation_type, **kwargs):
-    if confirmation_type == settings.ACTIVATION_TYPE:
-        user = instance
-        user.is_active = True
-        user.save()
-        if settings.ACTIVATION_AUTO_LOGIN:
-            user.backend = 'django.contrib.auth.backends.ModelBackend'
-            auth.login(request, user)