LDAP: use username instead of name for user dn (#883)

This commit is contained in:
Andreas Egli 2021-05-14 12:58:27 +02:00 committed by GitHub
parent 36b694fc41
commit 81056c3889
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,7 +117,7 @@ func (pi *ProviderInstance) Search(bindDN string, searchReq ldap.SearchRequest,
attrs = append(attrs, AKAttrsToLDAP(u.Attributes)...)
dn := fmt.Sprintf("cn=%s,%s", *u.Name, pi.UserDN)
dn := fmt.Sprintf("cn=%s,%s", *u.Username, pi.UserDN)
entries = append(entries, &ldap.Entry{DN: dn, Attributes: attrs})
}
}