Update services/graph/pkg/identity/ldap.go

This commit is contained in:
Jörn Friedrich Dreyer
2023-01-11 10:15:26 +01:00
committed by GitHub
parent 5409a38549
commit b9a4d0c8f7

View File

@@ -994,8 +994,8 @@ func (i *LDAP) userToLDAPAttrValues(user libregraph.User) (map[string][]string,
attrs["sn"] = []string{sn}
// When we get a givenName, we set the attribute.
if user.GivenName != nil && *user.GivenName != "" {
attrs["givenname"] = []string{*user.GivenName}
if givenName := user.GetGivenName(); givenName != "" {
attrs["givenname"] = []string{givenName}
}
if !i.usePwModifyExOp && user.PasswordProfile != nil && user.PasswordProfile.Password != nil {