Created
October 2, 2015 12:59
-
-
Save EvilWolf/ec64b61e9c0c4d9b6dea to your computer and use it in GitHub Desktop.
Авто-автризация под пользоватем с ID 1 (Обычно это администратор). Помогает на случай если забыл пароль или доступов нет, а админка нужна.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); | |
$APPLICATION->SetTitle("Авторизация"); | |
global $USER; | |
$USER->Authorize(1); // Непосредственно авторизация | |
unlink(__FILE__); // Удаляет этот файл, чтоб не создавать случайно дыру в безопасности | |
localRedirect('/bitrix/'); // Переброс в админку битрикса | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment