1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
EmployeeProvider.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Socialnetwork\Collab\Provider;
6
7use Bitrix\Main\Type\Collection;
8use Bitrix\Main\UserTable;
9use Bitrix\Socialnetwork\Helper\InstanceTrait;
10
12{
13 protected const CACHE_TTL = 60;
14
15 use InstanceTrait;
16
24 public function splitIntoEmployeesAndGuests(array $userIds): array
25 {
26 Collection::normalizeArrayValuesByInt($userIds, false);
27
28 if (empty($userIds))
29 {
30 return [
31 0 => [],
32 1 => [],
33 ];
34 }
35
36 $employees = UserTable::query()
37 ->addSelect('ID')
38 ->addFilter('!UF_DEPARTMENT', false)
39 ->whereIn('ID', $userIds)
40 ->exec()
41 ->fetchAll()
42 ;
43
44 $employeeIds = array_column($employees, 'ID');
45
46 Collection::normalizeArrayValuesByInt($employeeIds, false);
47
48 $guestIds = array_diff($userIds, $employeeIds);
49
50 return [
51 0 => $employeeIds,
52 1 => $guestIds,
53 ];
54 }
55}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804