Answer the question
In order to leave comments, you need to log in
How to display a forum with access "No access" to an unauthorized user?
How to show an unauthorized user a forum with access "No access" in the list of forums?
Component: bitrix:forum.index
At the same time, as far as I understand, when you try to follow the link leading to this forum, you should display the authorization page ( ?login=yes ).
Judging by the fact that in the resulting array (arResult) there is no forum with "No access" for an unauthorized user, the list of forums is formed in component.php. But where?
Answer the question
In order to leave comments, you need to log in
/bitrix/components/bitrix/forum.index/component.php:139
You need to change the logic of the filter:
if (!CForumUser::IsAdmin()):
$arFilter["PERMS"] = $USER->GetGroups() === "2" ? [] : array($USER->GetGroups(), 'A');
$arFilter["ACTIVE"] = "Y";
endif;
The check can be organized via if (!CUser::GetID()) {// logic for not authorized
} else {// logic for authorized
}
The solution I described does not pretend to be standard, with bitrix about half a year.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question