diff --git a/models/user.go b/models/user.go index 37e7640e..6dd31536 100644 --- a/models/user.go +++ b/models/user.go @@ -315,7 +315,7 @@ func CreateUser(u *User) (err error) { } // Auto-set admin for the first user. - if countUsers(sess) == 1 { + if CountUsers() == 1 { u.IsAdmin = true u.IsActive = true _, err = x.Id(u.Id).AllCols().Update(u)