Skip to content

Instantly share code, notes, and snippets.

@EscApp2
Created April 5, 2024 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EscApp2/7787c1e5381b0a271f49b2195c39c948 to your computer and use it in GitHub Desktop.
Save EscApp2/7787c1e5381b0a271f49b2195c39c948 to your computer and use it in GitHub Desktop.
bitrix Запретить сохранять файлы
<?
AddEventHandler("main",'OnFileSave','OnFileSave');
function OnFileSave(&$arFile, $fileName, $module)
{
if(isUserInGroup(9)){
unset($arFile['tmp_name']); // to delete
}
return false; // not true; true breaks event loop
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment