Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field login_name is empty after create an user #30508

Closed
Gitttttttt opened this issue Apr 16, 2024 · 0 comments · Fixed by #30511
Closed

Field login_name is empty after create an user #30508

Gitttttttt opened this issue Apr 16, 2024 · 0 comments · Fixed by #30511
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/api Concerns mainly the API type/bug
Milestone

Comments

@Gitttttttt
Copy link

Gitttttttt commented Apr 16, 2024

Description

When I create an user, I found the login_name is empty. My request like this:
curl -X 'POST' \ 'https://x.x.x.x:8080/api/v1/admin/users' \ -H 'accept: application/json' \ -H 'authorization: Basic xxxxxxxxx' \ -H 'Content-Type: application/json' \ -d '{ "created_at": "2024-04-16T01:56:42.453Z", "email": "test3@example.com", "full_name": "test3", "login_name": "test3", "must_change_password": false, "password": "aaaa@2024", "restricted": true, "send_notify": true, "source_id": 0, "username": "test3", "visibility": "public" }'

But the result like this:
image

Gitea Version

1.21.7

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

@yp05327 yp05327 added topic/api Concerns mainly the API issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented labels Apr 16, 2024
lunny pushed a commit that referenced this issue Apr 16, 2024
…30511)

Fix #30508

ps: if `sourceID` is not set, `LoginName` will be ignored
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Apr 16, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Apr 16, 2024
@lunny lunny added this to the 1.21.12 milestone Apr 16, 2024
silverwind pushed a commit that referenced this issue Apr 16, 2024
…30511) (#30516)

Backport #30511 by @yp05327

Fix #30508

ps: if `sourceID` is not set, `LoginName` will be ignored

Co-authored-by: yp05327 <576951401@qq.com>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/api Concerns mainly the API type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants