1
1
mirror of https://github.com/go-gitea/gitea synced 2024-05-29 07:25:47 +00:00

Fix admin user list (#15358)

This commit is contained in:
6543 2021-04-09 10:16:10 +02:00 committed by GitHub
parent 9c4601bdf8
commit 477c4530e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,10 +236,10 @@ func (u *User) GetEmail() string {
return u.Email
}
// GetAllUsers returns a slice of all users found in DB.
// GetAllUsers returns a slice of all individual users found in DB.
func GetAllUsers() ([]*User, error) {
users := make([]*User, 0)
return users, x.OrderBy("id").Find(&users)
return users, x.OrderBy("id").Where("type = ?", UserTypeIndividual).Find(&users)
}
// IsLocal returns true if user login type is LoginPlain.