This commit is contained in:
laodaming 2023-11-24 10:55:37 +08:00
parent 95d9c628d7
commit 18d0c3d55c

View File

@ -72,7 +72,7 @@ func (l *GetLdapOrganizationsLogic) GetLdapOrganizations(req *types.Request, r *
for _, attr := range v.Attributes { for _, attr := range v.Attributes {
//判断是否有成员(不包含root用户所以判断大于1) //判断是否有成员(不包含root用户所以判断大于1)
if attr.Name == "uniqueMember" { if attr.Name == "uniqueMember" {
memberCount = len(attr.Values) - 1 //不要包含原始用户 memberCount = len(attr.Values)
continue continue
} }
attribute[attr.Name] = strings.Join(attr.Values, ",") attribute[attr.Name] = strings.Join(attr.Values, ",")