1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-09-15 18:56:59 +00:00

Order the user's organization list alphabetically

This commit is contained in:
Dennis Schubert 2025-02-19 15:39:33 +01:00
parent d81baf21e9
commit 392921f585
No known key found for this signature in database
GPG key ID: 5A0304BEA7966D7E
2 changed files with 15 additions and 0 deletions

View file

@ -99,6 +99,7 @@ func GetUserOrgsList(ctx context.Context, user *user_model.User) ([]*MinimalOrg,
if err := db.GetEngine(ctx).Select(columnsStr).
Table("user").
Where(builder.In("`user`.`id`", queryUserOrgIDs(user.ID, true))).
OrderBy("`user`.lower_name ASC").
Find(&orgs); err != nil {
return nil, err
}