mirror of
https://github.com/friendica/friendica
synced 2025-04-24 12: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
|
@ -80,7 +80,7 @@ class Import extends \Friendica\BaseModule
|
|||
|
||||
protected function post(array $request = [])
|
||||
{
|
||||
if ($this->config->get('config', 'register_policy') != \Friendica\Module\Register::OPEN && !$this->app->isSiteAdmin()) {
|
||||
if (\Friendica\Module\Register::getPolicy() !== \Friendica\Module\Register::OPEN && !$this->app->isSiteAdmin()) {
|
||||
throw new HttpException\ForbiddenException($this->t('Permission denied.'));
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ class Import extends \Friendica\BaseModule
|
|||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
if (($this->config->get('config', 'register_policy') != \Friendica\Module\Register::OPEN) && !$this->app->isSiteAdmin()) {
|
||||
if ((\Friendica\Module\Register::getPolicy() !== \Friendica\Module\Register::OPEN) && !$this->app->isSiteAdmin()) {
|
||||
$this->systemMessages->addNotice($this->t('User imports on closed servers can only be done by an administrator.'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue