mirror of
https://github.com/humhub/humhub.git
synced 2025-03-21 23:49:55 +01:00
Rewrite dynamic configuration after authentication settings change
This commit is contained in:
parent
4e12d4d487
commit
8ea544a7d2
@ -9,6 +9,7 @@
|
||||
namespace humhub\modules\admin\models\forms;
|
||||
|
||||
use Yii;
|
||||
use humhub\libs\DynamicConfig;
|
||||
|
||||
/**
|
||||
* AuthenticationSettingsForm
|
||||
@ -54,7 +55,6 @@ class AuthenticationSettingsForm extends \yii\base\Model
|
||||
array('defaultUserGroup', 'exist', 'targetAttribute' => 'id', 'targetClass' => \humhub\modules\user\models\Group::className()),
|
||||
array('defaultUserProfileVisibility', 'in', 'range' => [1, 2]),
|
||||
array('defaultUserIdleTimeoutSec', 'integer', 'min' => 20),
|
||||
array('defaultUserIdleTimeoutSec', 'string', 'max' => 10)
|
||||
);
|
||||
}
|
||||
|
||||
@ -93,6 +93,8 @@ class AuthenticationSettingsForm extends \yii\base\Model
|
||||
if ($settingsManager->get('auth.allowGuestAccess')) {
|
||||
$settingsManager->set('auth.defaultUserProfileVisibility', $this->defaultUserProfileVisibility);
|
||||
}
|
||||
|
||||
DynamicConfig::rewrite();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user