def load_extra_data(backend, details, response, uid, user, social_user=None, *args, **kwargs):
 social_user = (social_user or UserSocialAuth.get_social_auth(backend.name, uid, user))
 if social_user:
  extra_data = backend.extra_data(user, uid, response, details)
  if (kwargs.get('original_email') and ('email' not in extra_data)):
   extra_data['email'] = kwargs.get('original_email')
  if (extra_data and (social_user.extra_data != extra_data)):
   if social_user.extra_data:
    social_user.extra_data.update(extra_data)
   else:
    social_user.extra_data = extra_data
   social_user.save()
  return {'social_user': social_user}

def load_extra_data ( backend , details , response , uid , user , social_user = None , * args , ** kwargs ) : social_user = ( social_user or UserSocialAuth . get_social_auth ( backend . name , uid , user ) ) if social_user : extra_data = backend . extra_data ( user , uid , response , details ) if ( kwargs . get ( 'original_email' ) and ( 'email' not in extra_data ) ) : extra_data [ 'email' ] = kwargs . get ( 'original_email' ) if ( extra_data and ( social_user . extra_data != extra_data ) ) : if social_user . extra_data : social_user . extra_data . update ( extra_data ) else : social_user . extra_data = extra_data social_user . save ( ) return { 'social_user' : social_user }
load extra data from provider and store it on current usersocialauth extra_data field .