Skip to content

local variable 'user' referenced before assignment #74

@Sashan

Description

@Sashan

Trying to login authenticated user again using OpenID account
throws exception.

patch below solved my problem:
diff --git a/socialregistration/views.py b/socialregistration/views.py
index 1788fef..f050dc2 100644
--- a/socialregistration/views.py
+++ b/socialregistration/views.py
@@ -305,7 +305,7 @@ def openid_callback(request, template='socialregistration/openid.html',
except OpenIDProfile.DoesNotExist: # There can only be one profile with the same identity
profile = OpenIDProfile.objects.create(user=request.user,
identity=identity)

  •            _connect(user, profile, client)
    
  •            _connect(request.user, profile, client)
    
         return HttpResponseRedirect(_get_next(request))
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions