Skip to content

Instantly share code, notes, and snippets.

@hipot
Created August 22, 2026 13:25
Show Gist options
  • Select an option

  • Save hipot/96349b047b820036fe2b623bec92f28c to your computer and use it in GitHub Desktop.

Select an option

Save hipot/96349b047b820036fe2b623bec92f28c to your computer and use it in GitHub Desktop.
tmp open site when it's closed in config
// tmp open site when it's closed in config
Bitrix\Main\EventManager::getInstance()->addEventHandler("main", "OnBeforeProlog", static function () {
if (\Bitrix\Main\Application::getInstance()?->getContext()?->getRequest()->get('site_closed') == 'N') {
\Bitrix\Main\Application::getInstance()->getKernelSession()['SESS_OPERATIONS']['edit_other_settings'] = 'Y';
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment