Skip to content

Field login_name is empty after create an user #30508

Closed
@Gitttttttt

Description

@Gitttttttt

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": "[email protected]", "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

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtopic/apiConcerns mainly the APItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions