Last active
June 2, 2023 21:25
-
-
Save voidvn/54401a939a1def4883124d4f16a12af4 to your computer and use it in GitHub Desktop.
Bitrix auth script (if you don't know admin password). Create this file in the site root directory.
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
<?php | |
require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/header.php'); | |
global $USER; | |
// auth user with id = 1 | |
$USER->Authorize(1); | |
// delete this script from server | |
@unlink(__FILE__); | |
LocalRedirect('/bitrix/admin/'); | |
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