Может помочь
[URL=https://dev.1c-bitrix.ru/api_help/main/events/onbeforeuserlogin.php]https://dev.1c-bitrix.ru/api_help/main/events/onbeforeuserlogin.php[/URL]
[URL=https://dev.1c-bitrix.ru/api_help/main/events/onbeforeuserlogin.php]https://dev.1c-bitrix.ru/api_help/main/events/onbeforeuserlogin.php[/URL]