Refer to 'created_unix' instead of 'id' in 'newest'/'oldest' sorting;

This commit is contained in:
Gabriel Bjørnager Jensen 2025-04-21 19:50:53 +02:00
parent 8e0b86a5dc
commit ae5324c6e0

View file

@ -63,9 +63,9 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
switch sortOrder {
case "newest":
orderBy = "`user`.id DESC"
orderBy = "`user`.created_unix DESC"
case "oldest":
orderBy = "`user`.id ASC"
orderBy = "`user`.created_unix ASC"
case "leastupdate":
orderBy = "`user`.updated_unix ASC"
case "reversealphabetically":