diff --git a/syncer.py b/syncer.py index a1fd1e7..d8546f4 100644 --- a/syncer.py +++ b/syncer.py @@ -40,10 +40,10 @@ def sync(): ldap_results = ldap_connector.search_s(config['LDAP_BASE_DN'], ldap.SCOPE_SUBTREE, config['LDAP_FILTER'], - ['userPrincipalName', 'cn', 'userAccountControl']) + ['mail', 'cn', 'userAccountControl']) ldap_results = map(lambda x: ( - x[1]['userPrincipalName'][0].decode(), + x[1]['mail'][0].decode(), x[1]['cn'][0].decode(), False if int(x[1]['userAccountControl'][0].decode()) & 0b10 else True), ldap_results)