Removed prevent_registration config var, functionally replaced by the Private section.
This commit is contained in:
parent
7ab2c69f5c
commit
818a8a9ade
2 changed files with 2 additions and 5 deletions
|
@ -18,9 +18,7 @@ $usernameValidationErrors = [
|
||||||
$siteIsPrivate = boolval(config_get_default(false, 'Private', 'enabled'));
|
$siteIsPrivate = boolval(config_get_default(false, 'Private', 'enabled'));
|
||||||
$loginPermission = $siteIsPrivate ? intval(config_get_default(0, 'Private', 'permission')) : 0;
|
$loginPermission = $siteIsPrivate ? intval(config_get_default(0, 'Private', 'permission')) : 0;
|
||||||
$canResetPassword = $siteIsPrivate ? boolval(config_get_default(false, 'Private', 'password_reset')) : true;
|
$canResetPassword = $siteIsPrivate ? boolval(config_get_default(false, 'Private', 'password_reset')) : true;
|
||||||
$canCreateAccount = !$siteIsPrivate
|
$canCreateAccount = !$siteIsPrivate && !boolval(config_get_default(false, 'Auth', 'lockdown'));
|
||||||
&& !boolval(config_get_default(false, 'Auth', 'lockdown'))
|
|
||||||
&& !boolval(config_get_default(false, 'Auth', 'prevent_registration'));
|
|
||||||
|
|
||||||
$authUsername = $isSubmission ? ($_POST['auth']['username'] ?? '') : ($_GET['username'] ?? '');
|
$authUsername = $isSubmission ? ($_POST['auth']['username'] ?? '') : ($_GET['username'] ?? '');
|
||||||
$authEmail = $isSubmission ? ($_POST['auth']['email'] ?? '') : ($_GET['email'] ?? '');
|
$authEmail = $isSubmission ? ($_POST['auth']['email'] ?? '') : ($_GET['email'] ?? '');
|
||||||
|
|
|
@ -124,8 +124,7 @@ final class Application
|
||||||
public function disableRegistration(): bool
|
public function disableRegistration(): bool
|
||||||
{
|
{
|
||||||
return $this->underLockdown()
|
return $this->underLockdown()
|
||||||
|| boolval(config_get_default(false, 'Private', 'enabled'))
|
|| boolval(config_get_default(false, 'Private', 'enabled'));
|
||||||
|| boolval(config_get_default(false, 'Auth', 'prevent_registration'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// used in some of the user functions still, fix that
|
// used in some of the user functions still, fix that
|
||||||
|
|
Loading…
Add table
Reference in a new issue