Answer the question
In order to leave comments, you need to log in
How to check user group before authorization?
Hello.
The question is this:
I made a personal account for a certain group of users, which is radically different from the existing one. The problem is that the customer wants the site to have one authorization button for everyone. Accordingly, before authorization, a certain group sees something that it should not see. How to proceed? Persistently explain to the customer that you need to do 2 authorization pages and, accordingly, display another button at the entrance? Or maybe somehow you can cheat without the second button, but I just don't know about it? :)
Answer the question
In order to leave comments, you need to log in
User groups https://dev.1c-bitrix.ru/api_help/main/reference/c...
Try to write a condition:
if (CSite::InGroup(array(1))) {
echo 'Администратор';
}
Try to catch on the OnAfterUserLogin event - it already has $arParams, which contains USER_ID (in case of successful authorization). The only thing is that you need to provide for the correct processing of backurl.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question