diff --git a/example_project/users/social_pipeline.py b/example_project/users/social_pipeline.py index bab9289..2b450aa 100644 --- a/example_project/users/social_pipeline.py +++ b/example_project/users/social_pipeline.py @@ -18,6 +18,8 @@ def save_avatar(strategy, details, user=None, *args, **kwargs): "type=normal").format(response['id']) elif 'twitter' in backend_name and response.get('profile_image_url'): social_thumb = response['profile_image_url'] + elif 'googleoauth2' in backend_name and response.get('image', {}).get('url'): + social_thumb = response['image']['url'].split('?')[0] else: social_thumb = "http://www.gravatar.com/avatar/" social_thumb += hashlib.md5(user.email.lower().encode('utf8')).hexdigest()