A
A
Anya Ivanova2021-11-09 18:14:03
1C-Bitrix
Anya Ivanova, 2021-11-09 18:14:03

How to change the page to which access is denied?

There is a registered user group that does not have access to the web form, if you go to the page where it is located, the authorization form pops up, but the user is already authorized, I would like to place my piece of code there, but I don’t understand where to find this file. Help me please.618a90306518e683732234.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anya Ivanova, 2021-11-09
@saharok13

As I understand it, Bitrix always uses an authorization form if access to a section or page is denied.
In the end, I removed access rights for certain user groups and just did a check

global $USER;
$groupID = 8;

if (in_array($groupID,$USER->GetUserGroupArray())){
    echo 'Пользователь состоит в группе';
} else {
    echo 'Пользователь НЕ состоит в группе';
}

If the user is in a group, then you can display one code, otherwise another.

N
no_one_safe, 2021-11-09
@no_one_safe

From a link in a browser, right?
Read the link - is there such a directory on the site?
1. If there is, open the index.php file in this directory and start reading the code.
2. If there is no such directory, then rotting works. Open the urlrewrite.php file in the root of the project and start reading the code. Find the desired processing rule and go to step 1.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question