diff options
Diffstat (limited to 'models/user/user.go')
-rw-r--r-- | models/user/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/user/user.go b/models/user/user.go index 2077d55f51..6f9c2f5b35 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -1171,9 +1171,9 @@ func GetUserByOpenID(uri string) (*User, error) { } // GetAdminUser returns the first administrator -func GetAdminUser() (*User, error) { +func GetAdminUser(ctx context.Context) (*User, error) { var admin User - has, err := db.GetEngine(db.DefaultContext). + has, err := db.GetEngine(ctx). Where("is_admin=?", true). Asc("id"). // Reliably get the admin with the lowest ID. Get(&admin) |