mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Include login_name in adminCreateUser response (#20283)
`login_name` (Authentication Sign-in Name) is not included in the response of `adminUserCreate` API. This PR is to return user-specified `login_name` if there is one.
This commit is contained in:
@@ -73,6 +73,7 @@ func toUser(user *user_model.User, signed, authed bool) *api.User {
|
||||
// only site admin will get these information and possibly user himself
|
||||
if authed {
|
||||
result.IsAdmin = user.IsAdmin
|
||||
result.LoginName = user.LoginName
|
||||
result.LastLogin = user.LastLoginUnix.AsTime()
|
||||
result.Language = user.Language
|
||||
result.IsActive = user.IsActive
|
||||
|
Reference in New Issue
Block a user