89 public static function set($userId, $eventId, $type): void
91 $userId = (int)$userId;
92 $type = ($type ===
'Y' ?
'Y' :
'N');
93 $eventId = trim($eventId);
98 $eventId = \CSocNetLogTools::findFullSetByEventID($eventId);
100 $connection = \Bitrix\Main\Application::getConnection();
101 $helper = $connection->getSqlHelper();
103 foreach ($eventId as $val)
106 'USER_ID' => $userId,
108 'EVENT_ID' => $helper->forSql($val),
115 $merge = $helper->prepareMerge(
116 static::getTableName(),
117 [
'USER_ID',
'EVENT_ID' ],
122 if ($merge[0] !==
'')
124 $connection->query($merge[0]);
133 $userId = (int)$userId;
134 $tasksNum = (int)$tasksNum;
135 $pageSize = (int)$pageSize;
147 && ($tasksNum / $pageSize) >= 0.25
150 $isAlreadyChecked = \CUserOptions::getOption(
'socialnetwork',
'~log_expertmode_checked',
'N', $userId);
151 if ($isAlreadyChecked !==
'Y')
154 \CUserOptions::setOption(
'socialnetwork',
'~log_expertmode_checked',
'Y',
false, $userId);