add comment and change pipeline method name

This commit is contained in:
Binnette 2020-03-01 11:11:27 +01:00
parent 179e8c7e97
commit b0e06fccfe
2 changed files with 7 additions and 3 deletions

View file

@ -213,5 +213,5 @@ SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.user.create_user',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'umap.utils.user_details'
'umap.utils.oauth_user_details'
)

View file

@ -110,8 +110,12 @@ def gzip_file(from_path, to_path):
with gzip.open(to_path, 'wb') as f_out:
f_out.writelines(f_in)
def user_details(strategy, details, user=None, *args, **kwargs):
"""Update user details using data from provider."""
def oauth_user_details(strategy, details, user=None, *args, **kwargs):
"""
This method is a pipeline stage only to be used with social_auth
Note this is a workaround that can break if social_auth is updated
Update user details using data from provider.
"""
if not user:
return