Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
userufdataprovider.php
1<?php
2namespace Bitrix\Main\Filter;
3
5{
6 protected $ufReserved = [
7 'UF_DEPARTMENT',
8 'UF_USER_CRM_ENTITY',
9 'UF_PUBLIC',
10 'UF_TIMEMAN',
11 'UF_TM_REPORT_REQ',
12 'UF_TM_FREE',
13 'UF_REPORT_PERIOD',
14 'UF_1C',
15 'UF_TM_ALLOWED_DELTA',
16 'UF_SETTING_DATE',
17 'UF_LAST_REPORT_DATE',
18 'UF_DELAY_TIME',
19 'UF_TM_REPORT_DATE',
20 'UF_TM_DAY',
21 'UF_TM_TIME',
22 'UF_TM_REPORT_TPL',
23 'UF_TM_MIN_DURATION',
24 'UF_TM_MIN_FINISH',
25 'UF_TM_MAX_START',
26 'UF_CONNECTOR_MD5',
27 'UF_WORK_BINDING',
28 'UF_IM_SEARCH',
29 'UF_BXDAVEX_CALSYNC',
30 'UF_BXDAVEX_MLSYNC',
31 'UF_UNREAD_MAIL_COUNT',
32 'UF_BXDAVEX_CNTSYNC',
33 'UF_BXDAVEX_MAILBOX',
34 'UF_VI_PASSWORD',
35 'UF_VI_BACKPHONE',
36 'UF_VI_PHONE',
37 'UF_VI_PHONE_PASSWORD'
38 ];
39
40 protected function postFilterFields(array $fields)
41 {
42 foreach ($this->getUfReserved() as $ufId)
43 {
44 if (isset($fields[$ufId]))
45 {
46 unset($fields[$ufId]);
47 }
48 }
49
50 $whiteList = $this->getSettings()->getWhiteList();
51
52 if (!empty($whiteList))
53 {
54 foreach($fields as $ufId => $field)
55 {
56 if (!in_array($ufId, $whiteList))
57 {
58 unset($fields[$ufId]);
59 }
60 }
61 }
62
63 return $fields;
64 }
65
66}