def get_provider_user_states(user):
 states = []
 found_user_auths = list(models.DjangoStorage.user.get_social_auth_for_user(user))
 for enabled_provider in provider.Registry.enabled():
  association = None
  for auth in found_user_auths:
   if enabled_provider.match_social_auth(auth):
    association = auth
    break
  if (enabled_provider.accepts_logins or association):
   states.append(ProviderUserState(enabled_provider, user, association))
 return states

def get_provider_user_states ( user ) : states = [ ] found_user_auths = list ( models . DjangoStorage . user . get_social_auth_for_user ( user ) ) for enabled_provider in provider . Registry . enabled ( ) : association = None for auth in found_user_auths : if enabled_provider . match_social_auth ( auth ) : association = auth break if ( enabled_provider . accepts_logins or association ) : states . append ( ProviderUserState ( enabled_provider , user , association ) ) return states
gets list of states of provider-user combinations .