J
J
Jupiter Max2018-12-09 08:01:42
1C-Bitrix
Jupiter Max, 2018-12-09 08:01:42

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

4 answer(s)
M
mills, 2018-12-09
@mills

User groups https://dev.1c-bitrix.ru/api_help/main/reference/c...
Try to write a condition:

if (CSite::InGroup(array(1))) {
echo 'Администратор';
}

A
Andrey Nikolaev, 2018-12-09
@gromdron

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.

A
Ainur Valiev, 2018-12-09
@vaajnur

No way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question