summaryrefslogtreecommitdiffstats
path: root/routers/web/auth/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/auth/auth.go')
-rw-r--r--routers/web/auth/auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/auth/auth.go b/routers/web/auth/auth.go
index e8250616ab..be936d2230 100644
--- a/routers/web/auth/auth.go
+++ b/routers/web/auth/auth.go
@@ -600,7 +600,7 @@ func createUserInContext(ctx *context.Context, tpl base.TplName, form interface{
// sends a confirmation email if required.
func handleUserCreated(ctx *context.Context, u *user_model.User, gothUser *goth.User) (ok bool) {
// Auto-set admin for the only user.
- if user_model.CountUsers() == 1 {
+ if user_model.CountUsers(nil) == 1 {
u.IsAdmin = true
u.IsActive = true
u.SetLastLogin()