1👍
✅
What I did in the end was create a new function for the pipeline that calls the existing populate_info
that is by default in the timeline, but only if it’s a new account (determined by ‘is_new’ in kwargs):
from social.pipeline.user import user_details
def populate_info(strategy, details, user=None, *args, **kwargs):
if (kwargs['is_new']):
user_details(strategy, details, user, args, kwargs)
on settings.py :
SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'social.pipeline.social_auth.social_user',
'social.pipeline.user.get_username',
'social.pipeline.social_auth.associate_by_email',
'social.pipeline.user.create_user',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'myapp.auth_pipeline.populate_info',
)
Source:stackexchange.com