Commit 58742087 authored by Benjamin Fischer's avatar Benjamin Fischer

[extension/ldap_export] fixed ldap3 API usage

parent 1a84ad40
......@@ -50,16 +50,16 @@ class LDAPExport(object):, "(objectClass=posixAccount)", attributes=['uid'])
for ldap_user in self.connection.entries:
if ldap_user.uid not in active_users:"Deleting unknown ldap user: %s", ldap_user.entry_get_dn())
self.connection.delete(ldap_user.entry_get_dn())"Deleting unknown ldap user: %s", ldap_user.entry_dn)
self.connection.delete(ldap_user.entry_dn), "(objectClass=posixGroup)", attributes=['cn'])
for ldap_group in self.connection.entries:
private_group = self.private_group and in active_users
public_group = in groups
if not private_group and not public_group:"Deleting unknown ldap group: %s", ldap_group.entry_get_dn())
self.connection.delete(ldap_group.entry_get_dn())"Deleting unknown ldap group: %s", ldap_group.entry_dn)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment