aboutsummaryrefslogtreecommitdiff
path: root/models/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go2
1 files changed, 1 insertions, 1 deletions
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)