Browse Source

more on #1443

pull/1440/merge
Unknwon 9 years ago
parent
commit
b1f08d3218
  1. 2
      models/user.go

2
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)

Loading…
Cancel
Save