...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/widget/custom/saletarget.php
- Класс: Bitrix\Crm\Widget\Custom\SaleTarget
- Вызов: SaleTarget::getActiveUsers
public function getActiveUsers() { $leftTimestamp = mktime(0, 0, 0, date('n') - 1, 1, date('Y')); $leftDate = Main\Type\DateTime::createFromTimestamp($leftTimestamp); $result = \Bitrix\Crm\DealTable::getList(array( 'select' => array('ASSIGNED_BY_ID'), 'filter' => array( '>=DATE_CREATE' => $leftDate, ), 'group' => array('ASSIGNED_BY_ID') )); $ids = array(); while ($row = $result->fetch()) { $ids[] = $row['ASSIGNED_BY_ID']; } return $this->getUsers($ids); }