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

Admin User Account list sort

`updated_unix` is not the same as "Last Sign-In"
This commit is contained in:
aceArt-GmbH authored and GitHub committed 2022-12-11 18:00:17 -06:00
1 parent c9ef03af65
commit 352a50d65f
2 files changed
+6 -2

No files matched your search

+4
View File
@@ -68,6 +68,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"