Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
2 parents 1ec6fd0 + 3b2438d commit aa8e9d0d0273e46ff64b28c0495a09f5df6cfd86 @krvss krvss committed Jan 19, 2012
Showing with 3 additions and 14 deletions.
  1. +0 −10 README.rst
  2. +2 −3 social_auth/backends/__init__.py
  3. +1 −1 social_auth/backends/pipeline/user.py
View
@@ -665,16 +665,6 @@ Join to django-social-auth_ community on Convore_ and bring any questions or
suggestions that will improve this app.
-South_ users should add this rule to enable migrations::
-
- try:
- import south
- from south.modelsinspector import add_introspection_rules
- add_introspection_rules([], ["^social_auth\.fields\.JSONField"])
- except:
- pass
-
-
If defining a custom user model, do not import social_auth from any models.py
that would finally import from the models.py that defines your User class or it
will make your project fail with a recursive import because social_auth uses
@@ -101,7 +101,6 @@ def authenticate(self, *args, **kwargs):
response = kwargs.get('response')
details = self.get_user_details(response)
uid = self.get_user_id(details, response)
-
out = self.pipeline(PIPELINE, backend=self, uid=uid,
social_user=None, details=details,
is_new=False, *args, **kwargs)
@@ -114,10 +113,10 @@ def authenticate(self, *args, **kwargs):
# account
user = social_user.user
user.social_user = social_user
- user.is_new = kwargs.get('is_new')
+ user.is_new = out.get('is_new')
return user
- def pipeline(self, pipeline, request, *args, **kwargs):
+ def pipeline(self, pipeline, *args, **kwargs):
"""Pipeline"""
out = kwargs.copy()
@@ -92,7 +92,7 @@ def update_user_details(backend, details, response, user, is_new=False, *args,
if not getattr(settings, 'SOCIAL_AUTH_CHANGE_SIGNAL_ONLY', False):
for name, value in details.iteritems():
# do not update username, it was already generated
- if name == USERNAME:
+ if name in (USERNAME, 'id', 'pk'):
continue
if value and value != getattr(user, name, None):
setattr(user, name, value)

0 comments on commit aa8e9d0

Please sign in to comment.