Remove redundant lines from PrepareReplacementsUser (#2130)

They are not necessary because they are added below. Also, they will
cause a crash if u.Name is nil.
This commit is contained in:
Denis Bilenko 2025-01-13 17:12:03 +01:00 committed by GitHub
parent 8234604cad
commit a6412e4334
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 2 deletions

View File

@ -185,8 +185,6 @@ func PrepareReplacementsUser(t testutil.TestingT, r *ReplacementsContext, u iam.
u.DisplayName,
u.UserName,
iamutil.GetShortUserName(&u),
u.Name.FamilyName,
u.Name.GivenName,
}
if u.Name != nil {
names = append(names, u.Name.FamilyName)