1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

API Endpoints for organization members (#645)

This commit is contained in:
Ethan Koenig
2017-01-19 19:31:46 -07:00
committed by Lunny Xiao
parent 3c4d5e1ed5
commit fcf02e4961
3 changed files with 155 additions and 2 deletions

View File

@@ -1052,8 +1052,10 @@ func GetUserEmailsByNames(names []string) []string {
// GetUsersByIDs returns all resolved users from a list of Ids.
func GetUsersByIDs(ids []int64) ([]*User, error) {
ous := make([]*User, 0, len(ids))
err := x.
In("id", ids).
if len(ids) == 0 {
return ous, nil
}
err := x.In("id", ids).
Asc("name").
Find(&ous)
return ous, err