From 818a8a9adeedf42684b7c106a3c85ac583daf5b5 Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 5 Oct 2018 09:36:16 +0200 Subject: [PATCH] Removed prevent_registration config var, functionally replaced by the Private section. --- public/auth.php | 4 +--- src/Application.php | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/public/auth.php b/public/auth.php index aa9e1dd5..89453408 100644 --- a/public/auth.php +++ b/public/auth.php @@ -18,9 +18,7 @@ $usernameValidationErrors = [ $siteIsPrivate = boolval(config_get_default(false, 'Private', 'enabled')); $loginPermission = $siteIsPrivate ? intval(config_get_default(0, 'Private', 'permission')) : 0; $canResetPassword = $siteIsPrivate ? boolval(config_get_default(false, 'Private', 'password_reset')) : true; -$canCreateAccount = !$siteIsPrivate - && !boolval(config_get_default(false, 'Auth', 'lockdown')) - && !boolval(config_get_default(false, 'Auth', 'prevent_registration')); +$canCreateAccount = !$siteIsPrivate && !boolval(config_get_default(false, 'Auth', 'lockdown')); $authUsername = $isSubmission ? ($_POST['auth']['username'] ?? '') : ($_GET['username'] ?? ''); $authEmail = $isSubmission ? ($_POST['auth']['email'] ?? '') : ($_GET['email'] ?? ''); diff --git a/src/Application.php b/src/Application.php index 9c7bc2dd..736402d2 100644 --- a/src/Application.php +++ b/src/Application.php @@ -124,8 +124,7 @@ final class Application public function disableRegistration(): bool { return $this->underLockdown() - || boolval(config_get_default(false, 'Private', 'enabled')) - || boolval(config_get_default(false, 'Auth', 'prevent_registration')); + || boolval(config_get_default(false, 'Private', 'enabled')); } // used in some of the user functions still, fix that