• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/component/loglist/processor.php
  • Класс: BitrixSocialnetworkComponentLogListProcessor
  • Вызов: Processor::getExpertModeValue
public function getExpertModeValue(&$result): void
{
	$params = $this->getComponent()->arParams;

	if (
		$params['USE_TASKS'] === 'Y'
		&& Util::checkUserAuthorized()
	)
	{
		$result['EXPERT_MODE'] = 'N';

		$res = LogViewTable::getList([
			'order' => [],
			'filter' => [
				'USER_ID' => $result['currentUserId'],
				'=EVENT_ID' => 'tasks'
			],
			'select' => [ 'TYPE' ]
		]);
		if ($logViewFields = $res->fetch())
		{
			$result['EXPERT_MODE'] = ($logViewFields['TYPE'] === 'N' ? 'Y' : 'N');
		}
	}
}