aboutsummaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/models/user.go b/models/user.go
index 90ca189ef0..7c7e81830e 100644
--- a/models/user.go
+++ b/models/user.go
@@ -849,10 +849,9 @@ func CreateUser(u *User) (err error) {
return err
}
u.HashPassword(u.Passwd)
- u.AllowCreateOrganization = setting.Service.DefaultAllowCreateOrganization
+ u.AllowCreateOrganization = setting.Service.DefaultAllowCreateOrganization && !setting.Admin.DisableRegularOrgCreation
u.MaxRepoCreation = -1
u.Theme = setting.UI.DefaultTheme
- u.AllowCreateOrganization = !setting.Admin.DisableRegularOrgCreation
if _, err = sess.Insert(u); err != nil {
return err