From b9a4d0c8f7d1676f1e64c282eeeef9b4f55af636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 11 Jan 2023 10:15:26 +0100 Subject: [PATCH] Update services/graph/pkg/identity/ldap.go --- services/graph/pkg/identity/ldap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/graph/pkg/identity/ldap.go b/services/graph/pkg/identity/ldap.go index b316c08fb5..9f96812ad7 100644 --- a/services/graph/pkg/identity/ldap.go +++ b/services/graph/pkg/identity/ldap.go @@ -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 {