1
0
Fork 0
forked from forgejo/forgejo

Fix sorting admin user list by last login (#22081) (#22107)

This commit is contained in:
aceArt-GmbH 2022-12-13 23:37:33 +01:00 committed by GitHub
parent c36a1bc766
commit 1409b348c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -69,6 +69,10 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
orderBy = "`user`.updated_unix ASC"
case "reversealphabetically":
orderBy = "`user`.name DESC"
case "lastlogin":
orderBy = "`user`.last_login_unix ASC"
case "reverselastlogin":
orderBy = "`user`.last_login_unix DESC"
case UserSearchDefaultSortType: // "alphabetically"
default:
orderBy = "`user`.name ASC"