omab/django-social-auth — pull request #633 by serdardalgic (2013-03-14 10:02:55+00:00)
Title: Return value fix for pipeline social associate user function

Hi!

Is there a special reason for returning None and {} in these if statements? What's the difference or returning None or empty dict?

if social_user:
return None

if not user:
return {}

when a pipeline is returned, it goes into that line of pipeline function of backend.SocialAuthBackend class.

result = func(*args, **out) or {}
...
if isinstance(result, dict):
out.update(result)

So, with {}, out.update doesn't change anything. If we return None, this out.update will not be called.

And here is the patch for doing this. Please correct me if I'm missing smt.

Thanks.