def sync_ldap_users(connection, failed_users=None):
 users = User.objects.filter(userprofile__creation_method=str(UserProfile.CreationMethod.EXTERNAL)).all()
 for user in users:
  _import_ldap_users(connection, user.username, failed_users=failed_users)
 return users

def sync_ldap_users ( connection , failed_users = None ) : users = User . objects . filter ( userprofile__creation_method = str ( UserProfile . CreationMethod . EXTERNAL ) ) . all ( ) for user in users : _import_ldap_users ( connection , user . username , failed_users = failed_users ) return users
syncs ldap user information .