def existing_user_fields(fields):
 user_fields = get_user_model()._meta.fields
 user_field_names = [field.name for field in user_fields]
 return [field for field in fields if (field in user_field_names)]

def existing_user_fields ( fields ) : user_fields = get_user_model ( ) . _meta . fields user_field_names = [ field . name for field in user_fields ] return [ field for field in fields if ( field in user_field_names ) ]
starting with django 1 .