diff --git a/src/phi/async_ldap/mixins.py b/src/phi/async_ldap/mixins.py index 458570b..3194ee5 100644 --- a/src/phi/async_ldap/mixins.py +++ b/src/phi/async_ldap/mixins.py @@ -233,6 +233,8 @@ class Member(object): self.base_dn = client.base_dn self.name = name self._entry = LDAPEntry(self.dn) + self[self.id_tag] = name + self._entry["ou"] = self.ou if kwargs: _hydrate(self, kwargs) diff --git a/src/phi/async_ldap/new_model.py b/src/phi/async_ldap/new_model.py index 645265e..2459728 100644 --- a/src/phi/async_ldap/new_model.py +++ b/src/phi/async_ldap/new_model.py @@ -45,7 +45,7 @@ class Group(mixins.Singleton, mixins.Entry, mixins.Member): _instances = dict() # type: ignore id_tag = "cn" ou = "Congregations" - ldap_attributes = ["uid", "ou", "member"] + ldap_attributes = ["cn", "ou", "member"] memeber_classes = {"Hackers": User, "Robots": Service} async def add_member(self, member):