Skip to content

Commit

Permalink
Check for user in associate_by_email pipeline method. Closes #392
Browse files Browse the repository at this point in the history
  • Loading branch information
omab committed Jul 9, 2012
1 parent 9ed16f2 commit d52c0fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion social_auth/backends/pipeline/associate.py
Expand Up @@ -6,8 +6,11 @@
from social_auth.backends.exceptions import AuthException


def associate_by_email(details, *args, **kwargs):
def associate_by_email(details, user=None, *args, **kwargs):
"""Return user entry with same email address as one returned on details."""
if user:
return None

email = details.get('email')

warn_setting('SOCIAL_AUTH_ASSOCIATE_BY_MAIL', 'associate_by_email')
Expand Down

0 comments on commit d52c0fc

Please sign in to comment.