mirror of
https://github.com/friendica/friendica
synced 2025-04-19 06:30:10 +00:00
Automatically close the registration when the admin is inactive
This commit is contained in:
parent
4834255acf
commit
4b695e361c
18 changed files with 49 additions and 35 deletions
|
@ -47,7 +47,7 @@ class Config extends BaseApi
|
|||
'broughtby' => '',
|
||||
'broughtbyurl' => '',
|
||||
'timezone' => DI::config()->get('system', 'default_timezone'),
|
||||
'closed' => (DI::config()->get('config', 'register_policy') == Register::CLOSED),
|
||||
'closed' => Register::getPolicy() === Register::CLOSED,
|
||||
'inviteonly' => (bool)DI::config()->get('system', 'invitation_only'),
|
||||
'private' => (bool)DI::config()->get('system', 'block_public'),
|
||||
'textlimit' => (string) DI::config()->get('config', 'api_import_size', DI::config()->get('config', 'max_import_size')),
|
||||
|
|
|
@ -166,9 +166,9 @@ class InstanceV2 extends BaseApi
|
|||
|
||||
private function buildRegistrationsInfo(): InstanceEntity\Registrations
|
||||
{
|
||||
$register_policy = intval($this->config->get('config', 'register_policy'));
|
||||
$enabled = ($register_policy != Register::CLOSED);
|
||||
$approval_required = ($register_policy == Register::APPROVE);
|
||||
$register_policy = Register::getPolicy();
|
||||
$enabled = $register_policy !== Register::CLOSED;
|
||||
$approval_required = $register_policy === Register::APPROVE;
|
||||
|
||||
return new InstanceEntity\Registrations($enabled, $approval_required);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue