From 477c4530e48c072aa3d02c9e62c8428768c443e6 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 9 Apr 2021 10:16:10 +0200 Subject: [PATCH] Fix `admin user list` (#15358) --- models/user.go | 4 ++-- 1 file 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.