summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-04-09 10:16:10 +0200
committerGitHub <noreply@github.com>2021-04-09 10:16:10 +0200
commit477c4530e48c072aa3d02c9e62c8428768c443e6 (patch)
tree5de1d6e8f292c9de4f35064479c18f38166de568 /models
parent9c4601bdf8369ed72944085e3952111cf4aeea11 (diff)
downloadgitea-477c4530e48c072aa3d02c9e62c8428768c443e6.tar.gz
gitea-477c4530e48c072aa3d02c9e62c8428768c443e6.zip
Fix `admin user list` (#15358)
Diffstat (limited to 'models')
-rw-r--r--models/user.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/user.go b/models/user.go
index cdb82603cd..53a8ac3486 100644
--- a/models/user.go
+++ b/models/user.go
@@ -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.