]> git.parisson.com Git - django-social-auth.git/commitdiff
If the user was already logged in they would not be redirected to the corrent url...
authorDerrick Petzold <contact@derrickpetzold.com>
Sun, 19 Feb 2012 04:15:09 +0000 (18:15 -1000)
committerDerrick Petzold <contact@derrickpetzold.com>
Sun, 19 Feb 2012 04:15:09 +0000 (18:15 -1000)
social_auth/views.py

index 45140ee95621e928252eff691c26600c40ac6a47..fa703f1903924bf6e86f4d76c6a0f2d825011896 100644 (file)
@@ -147,6 +147,9 @@ def complete_process(request, backend, *args, **kwargs):
     if isinstance(user, HttpResponse):
         return user
 
+    if not user and request.user.is_authenticated():
+        return HttpResponseRedirect(redirect_value)
+
     if user:
         if getattr(user, 'is_active', True):
             login(request, user)