Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ratingvote.php
1<?php
9
12
14{
15 public static function onGetRatingContentOwner($params)
16 {
17 if(
18 intval($params['ENTITY_ID'])
19 && $params['ENTITY_TYPE_ID'] == 'LISTS_NEW_ELEMENT'
20 && Loader::includeModule('socialnetwork')
21 )
22 {
23 $res = LogTable::getList(array(
24 'filter' => array(
25 '=SOURCE_ID' => $params['ENTITY_ID'],
26 'EVENT_ID' => 'lists_new_element'
27 ),
28 'select' => array('USER_ID')
29 ));
30 if (
31 ($logFields = $res->fetch())
32 && intval($logFields['USER_ID']) > 0
33 )
34 {
35 return intval($logFields['USER_ID']);
36 }
37 }
38
39 return false;
40 }
41
42}
43?>