aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/admin/site/update_advanced.php7
-rw-r--r--actions/register.php2
-rw-r--r--actions/systemsettings/install.php1
3 files changed, 9 insertions, 1 deletions
diff --git a/actions/admin/site/update_advanced.php b/actions/admin/site/update_advanced.php
index c9b78c261..7e6bd0cc6 100644
--- a/actions/admin/site/update_advanced.php
+++ b/actions/admin/site/update_advanced.php
@@ -49,6 +49,13 @@ if (datalist_get('default_site')) {
} else {
unset_config('debug', $site->getGUID());
}
+
+ // allow new user registration?
+ if (get_input('allow_registration', FALSE)) {
+ set_config('allow_registration', TRUE, $site->getGUID());
+ } else {
+ set_config('allow_registration', FALSE, $site->getGUID());
+ }
$https_login = get_input('https_login');
if ($https_login) {
diff --git a/actions/register.php b/actions/register.php
index 081a4e454..556bad4cd 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -24,7 +24,7 @@ if (is_array($admin)) {
$admin = $admin[0];
}
-if (!$CONFIG->disable_registration) {
+if ($CONFIG->allow_registration) {
// For now, just try and register the user
try {
$guid = register_user($username, $password, $name, $email, false, $friend_guid, $invitecode);
diff --git a/actions/systemsettings/install.php b/actions/systemsettings/install.php
index 589e3a06c..3516a2ff2 100644
--- a/actions/systemsettings/install.php
+++ b/actions/systemsettings/install.php
@@ -68,6 +68,7 @@ if (get_input('settings') == 'go') {
set_config('view', get_input('view'), $site->getGUID());
set_config('language', get_input('language'), $site->getGUID());
set_config('default_access', get_input('default_access'), $site->getGUID());
+ set_config('allow_registration', TRUE, $site->getGUID());
$debug = get_input('debug');
if ($debug) {