From d52c0fc3492c9a540ce988a25cd197538f4ecb86 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Aguirre?= Date: Mon, 9 Jul 2012 00:09:19 -0300 Subject: [PATCH] Check for user in associate_by_email pipeline method. Closes #392 --- social_auth/backends/pipeline/associate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/social_auth/backends/pipeline/associate.py b/social_auth/backends/pipeline/associate.py index aafd2d3..c2d0b23 100644 --- a/social_auth/backends/pipeline/associate.py +++ b/social_auth/backends/pipeline/associate.py @@ -6,8 +6,11 @@ from social_auth.backends.pipeline import warn_setting 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') -- 2.39.5