Skip to content

Commit 90cadd6

Browse files
committed
Added verifications to username
1 parent 122eb03 commit 90cadd6

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • plugin/commands/eventlog

plugin/commands/eventlog/get.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ func (cmd *GetCommand) Run(args []string) error {
111111
}
112112

113113
for _, log := range logs {
114-
user := ""
115-
if log.UserId != nil {
116-
user = *log.User.Username
117-
} else {
118-
user = *log.UserType
114+
user := "CUSTOMER"
115+
if log.UserId != nil && log.User != nil && log.User.Username != nil {
116+
user = utils.FormatStringPointer(log.User.Username)
117+
} else if log.UserType != nil {
118+
user = utils.FormatStringPointer(log.UserType)
119119
}
120120

121121
if metadata {

0 commit comments

Comments
 (0)