summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-07 00:09:28 +0800
committerUnknwon <u@gogs.io>2015-08-07 00:09:28 +0800
commitb1f08d3218cd83ae854fbfe98a39b6d2f0fa47e3 (patch)
treed8f10b478bc5f47df23de4854f7a3be43969870b
parentd922b7e5049a88fbba436ad08c817ac79ee64c6b (diff)
downloadgitea-b1f08d3218cd83ae854fbfe98a39b6d2f0fa47e3.tar.gz
gitea-b1f08d3218cd83ae854fbfe98a39b6d2f0fa47e3.zip
more on #1443
-rw-r--r--models/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go
index 37e7640ee6..6dd31536fb 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)