17 $user = \CUser::getList(
20 [
'FIELDS' =>
'ID',
'SELECT' => [
'UF_DEPARTMENT']]
23 $isIntranet = ($user[
'UF_DEPARTMENT'][0] ?? 0) > 0;
26 $this->
addError(
new Error(
'Extranet site is not allowed.',
'EXTRANET_IS_NOT_ALLOWED'));
27 return new EventResult(EventResult::ERROR,
null,
null, $this);
onBeforeAction(Event $event)