Skip to content

Commit

Permalink
Merge branch 'feat/1.1.2/user' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkinStars committed Aug 14, 2023
2 parents 68984bd + 236b1f7 commit 8a7715e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/service/user_admin/user_backyard.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (us *UserAdminService) formatBulkAddUsers(ctx context.Context, req *schema.
break
}
if existDisplayNames[user.DisplayName] {
errorData.Field = "displayName"
errorData.Field = "name"
errorData.Line = line + 1
errorData.Content = user.DisplayName
errorData.ExtraMessage = translator.Tr(lang, reason.UsernameDuplicate)
Expand All @@ -211,7 +211,7 @@ func (us *UserAdminService) formatBulkAddUsers(ctx context.Context, req *schema.
if fields, e := val.Check(user); e != nil {
errorData.SetErrField(fields)
errorData.Line = line + 1
errorData.Content = fmt.Sprintf("%s, %s", user.DisplayName, user.Email)
errorData.Content = fmt.Sprintf("%s, %s, %s", user.DisplayName, user.Email, user.Password)
break
}

Expand All @@ -234,7 +234,7 @@ func (us *UserAdminService) formatBulkAddUsers(ctx context.Context, req *schema.
userInfo.Pass = string(hashPwd)
userInfo.Username, err = us.userCommonService.MakeUsername(ctx, userInfo.DisplayName)
if err != nil {
errorData.Field = "display_name"
errorData.Field = "name"
errorData.Line = line + 1
errorData.Content = user.DisplayName
errorData.ExtraMessage = translator.Tr(lang, reason.UsernameInvalid)
Expand Down

0 comments on commit 8a7715e

Please sign in to comment.