mirror of
https://github.com/NamelessMC/Nameless
synced 2026-08-18 06:29:04 -04:00
* Remove internal deprecations * add convert profile posts task + remove dead lang_charset references * guard og_image usages * fix * add note about mailhog * revert group sync manager for time being * review amendments * fox
25 lines
1.3 KiB
PHP
25 lines
1.3 KiB
PHP
<?php
|
|
if (Input::exists()) {
|
|
if (Token::check()) {
|
|
if (Input::get('action') === 'integration_settings') {
|
|
$premium_account = isset($_POST['premium_account']) && $_POST['premium_account'] == 'on' ? '1' : '0';
|
|
Settings::set('uuid_linking', $premium_account);
|
|
|
|
$username_registration = isset($_POST['username_registration']) && $_POST['username_registration'] == 'on' ? '1' : '0';
|
|
Settings::set('mc_username_registration', $username_registration, 'Minecraft Integration');
|
|
|
|
Session::flash('integrations_success', $language->get('admin', 'integration_updated_successfully'));
|
|
Redirect::to(URL::build('/panel/core/integrations/', 'integration=' . $integration->getName()));
|
|
}
|
|
} else {
|
|
$errors[] = $language->get('general', 'invalid_token');
|
|
}
|
|
}
|
|
|
|
$template->getEngine()->addVariables([
|
|
'PREMIUM_ACCOUNTS' => $language->get('admin', 'force_premium_accounts'),
|
|
'PREMIUM_ACCOUNTS_VALUE' => Settings::get('uuid_linking'),
|
|
'REQUIRE_USERNAME_REGISTRATION' => $language->get('admin', 'require_minecraft_username_on_registration'),
|
|
'REQUIRE_USERNAME_REGISTRATION_VALUE' => Settings::get('mc_username_registration', '1', 'Minecraft Integration'),
|
|
'SETTINGS_TEMPLATE' => 'integrations/minecraft/integration_settings.tpl'
|
|
]);
|