14class User extends \IRestService
20 private const ALLOWED_USER_NAME_FIELDS = [
34 'PERSONAL_PROFESSION',
54 private const ALLOWED_USER_BASIC_FIELDS = [
73 'PERSONAL_PROFESSION',
116 'UF_EMPLOYMENT_DATE',
122 private static $entityUser =
'USER';
123 private static $nameFieldFullPrefix =
'UF_USR_';
124 private static $userUserFieldList;
141 'LAST_ACTIVITY_DATE',
143 'PERSONAL_PROFESSION',
159 'PERSONAL_PROFESSION',
182 'UF_EMPLOYMENT_DATE',
206 $result = static::$allowedUserFields;
208 if (Loader::includeModule(
'intranet'))
210 $result[] =
'USER_TYPE';
216 private static function isMainScope(\CRestServer $server)
218 return in_array(static::SCOPE_USER, $server->getAuthScope());
221 private static function getErrorScope()
224 'error' =>
'insufficient_scope',
225 'error_description' =>
'The request requires higher privileges than provided by the access token',
229 private static function getAllowedUserFields($scopeList): array
232 if (in_array(static::SCOPE_USER, $scopeList))
234 $result = static::getDefaultAllowedUserFields();
238 if (in_array(static::SCOPE_USER_BASIC, $scopeList))
240 $result = static::ALLOWED_USER_BASIC_FIELDS;
242 elseif (in_array(static::SCOPE_USER_BRIEF, $scopeList))
244 $result = static::ALLOWED_USER_NAME_FIELDS;
247 if (Loader::includeModule(
'intranet'))
249 $result[] =
'USER_TYPE';
254 $result = array_merge($result, static::getUserFields());
263 unset(static::$allowedUserFields[$key]);
268 static::$allowedUserFields[] = $field;
274 \CRestUtil::GLOBAL_SCOPE => array(
275 'user.admin' => array(__CLASS__,
'isAdmin'),
276 'user.access' => array(__CLASS__,
'hasAccess'),
277 'access.name' => array(__CLASS__,
'getAccess'),
283 $result[static::SCOPE_USER] = array(
284 'user.fields' => array(__CLASS__,
'getFields'),
285 'user.current' => array(__CLASS__,
'userCurrent'),
286 'user.get' => array(__CLASS__,
'userGet'),
287 'user.search' => array(__CLASS__,
'userGet'),
288 'user.add' => array(__CLASS__,
'userAdd'),
289 'user.update' => array(__CLASS__,
'userUpdate'),
290 'user.online' => array(__CLASS__,
'userOnline'),
291 'user.counters' => array(__CLASS__,
'userCounters'),
292 \CRestUtil::EVENTS => array(
293 'OnUserAdd' => array(
'main',
'OnUserInitialize', array(__CLASS__,
'onUserInitialize')),
296 $result[static::SCOPE_USER_BRIEF] = [
297 'user.fields' => array(__CLASS__,
'getFields'),
298 'user.current' => array(__CLASS__,
'userCurrent'),
299 'user.get' => array(__CLASS__,
'userGet'),
300 'user.search' => array(__CLASS__,
'userGet'),
301 'user.online' => array(__CLASS__,
'userOnline'),
302 'user.counters' => array(__CLASS__,
'userCounters'),
303 \CRestUtil::EVENTS => array(
304 'OnUserAdd' => array(
'main',
'OnUserInitialize', array(__CLASS__,
'onUserInitialize')),
307 $result[static::SCOPE_USER_BASIC] = [
308 'user.fields' => array(__CLASS__,
'getFields'),
309 'user.current' => array(__CLASS__,
'userCurrent'),
310 'user.get' => array(__CLASS__,
'userGet'),
311 'user.search' => array(__CLASS__,
'userGet'),
312 'user.online' => array(__CLASS__,
'userOnline'),
313 'user.counters' => array(__CLASS__,
'userCounters'),
314 \CRestUtil::EVENTS => array(
315 'OnUserAdd' => array(
'main',
'OnUserInitialize', array(__CLASS__,
'onUserInitialize')),
319 'user.userfield.add' => [UserField::class,
'addRest'],
320 'user.userfield.update' => [UserField::class,
'updateRest'],
321 'user.userfield.delete' => [UserField::class,
'deleteRest'],
322 'user.userfield.list' => [UserField::class,
'getListRest'],
323 'user.userfield.file.get' => [__CLASS__,
'getFile'],
330 private static function getUserFields()
332 if (is_null(static::$userUserFieldList))
334 static::$userUserFieldList = [];
335 global $USER_FIELD_MANAGER;
337 $fields = $USER_FIELD_MANAGER->GetUserFields(
"USER");
339 foreach ($fields as $code => $field)
341 if (mb_strpos($code, static::$nameFieldFullPrefix) === 0)
343 static::$userUserFieldList[] = $code;
348 return static::$userUserFieldList;
353 global $USER_FIELD_MANAGER;
355 $fields = $USER_FIELD_MANAGER->GetUserFields(
"USER");
357 foreach(static::getDefaultAllowedUserFields() as $key => $field)
359 if(mb_substr($field, 0, 3) ===
'UF_' && !array_key_exists($field, $fields))
361 static::unsetDefaultAllowedUserField($key);
365 foreach ($fields as $code => $field)
367 if (mb_strpos($code, static::$nameFieldFullPrefix) === 0)
369 static::setDefaultAllowedUserField($code);
378 $dbRes = \CUser::GetByID($ID);
379 $arUser = $dbRes->Fetch();
381 if(in_array($arUser[
'EXTERNAL_AUTH_ID'], UserTable::getExternalUserTypes()))
383 throw new RestException(
'Unnecessary event call for this user type');
386 $allowedFields =
null;
387 if ($arHandler[
'APP_ID'] > 0)
392 $scope = explode(
',', $app[
'SCOPE']);
393 $allowedFields = static::getAllowedUserFields($scope);
398 if($arUser[
'PERSONAL_PHOTO'] > 0)
400 $arRes[
'PERSONAL_PHOTO'] = \CRestUtil::GetFile($arUser[
"PERSONAL_PHOTO"]);
408 return \CRestUtil::isAdmin();
415 $params = array_change_key_case($params, CASE_UPPER);
417 if(!is_array($params[
'ACCESS']))
419 $params[
'ACCESS'] = array($params[
'ACCESS']);
422 return self::isAdmin() || $USER->canAccess($params[
'ACCESS']);
427 $params = array_change_key_case($params, CASE_UPPER);
429 if(!is_array($params[
'ACCESS']) || count($params[
'ACCESS']) <= 0)
435 $ob = new \CAccess();
436 $res = $ob->getNames($params[
'ACCESS']);
437 foreach($res as $key => $value)
439 if(!in_array($key, $params[
'ACCESS']))
447 public static function getFields($query = [], $nav = 0, \CRestServer $server =
null)
449 global $USER_FIELD_MANAGER;
451 static::checkAllowedFields();
455 $langMessages = array_merge(
456 IncludeModuleLangFile(
'/bitrix/modules/main/admin/user_edit.php',
false,
true),
457 IncludeModuleLangFile(
'/bitrix/modules/main/admin/user_admin.php',
false,
true)
459 $fieldsList = $USER_FIELD_MANAGER->getUserFields(
'USER', 0, LANGUAGE_ID);
460 if (!is_null($server))
462 $allowedFields = static::getAllowedUserFields($server->getAuthScope());
466 $allowedFields = static::getDefaultAllowedUserFields();
468 foreach ($allowedFields as $key)
470 if(mb_substr($key, 0, 3) !=
'UF_')
472 $lkey = isset($langMessages[$key]) ? $key : str_replace(
'PERSONAL_',
'USER_', $key);
473 $res[$key] = isset($langMessages[$lkey]) ? $langMessages[$lkey] : $key;
474 if(mb_substr($res[$key], -1) ==
':')
476 $res[$key] = mb_substr($res[$key], 0, -1);
481 $res[$key] = $fieldsList[$key][
'EDIT_FORM_LABEL'];
488 public static function userCurrent($query, $n, \CRestServer $server)
492 static::checkAllowedFields();
494 $dbRes = \CUser::getByID($USER->getID());
495 $userFields = $dbRes->fetch();
497 $allowedFields = static::getAllowedUserFields($server->getAuthScope());
499 if($userFields[
'PERSONAL_PHOTO'] > 0)
501 $result[
'PERSONAL_PHOTO'] = \CRestUtil::GetFile($userFields[
"PERSONAL_PHOTO"]);
504 $server->setSecurityState(array(
505 "ID" => $result[
'ID'],
506 "EMAIL" => $result[
'EMAIL'] ??
'',
507 "NAME" => $result[
'NAME'],
513 public static function userGet($query, $nav = 0, \CRestServer $server)
517 static::checkAllowedFields();
519 static $moduleAdminList =
false;
521 $query = array_change_key_case($query, CASE_UPPER);
523 $sort = $query[
'SORT'];
524 $order = $query[
'ORDER'];
529 "small"=>[
"width"=>150,
"height" => 150],
530 "medium"=>[
"width"=>300,
"height" => 300],
531 "large"=>[
"width"=>1000,
"height" => 1000],
534 $presetName = $query[
"IMAGE_RESIZE"];
535 $resize = ($presetName && $resizePresets[$presetName]
536 ? $resizePresets[$presetName]
539 if (isset($query[
'ADMIN_MODE']) && $query[
'ADMIN_MODE'])
541 if ($moduleAdminList ===
false && Loader::includeModule(
'socialnetwork'))
543 $moduleAdminList = \Bitrix\Socialnetwork\User::getModuleAdminList(array(SITE_ID,
false));
546 if (is_array($moduleAdminList))
548 $adminMode = (array_key_exists($USER->getID(), $moduleAdminList));
557 if ($server->getMethod() ==
"user.search")
564 if (isset($query[
'FILTER']) && is_array($query[
'FILTER']))
570 $query = array_change_key_case($query[
'FILTER'], CASE_UPPER);
573 $filter = self::prepareUserFilter(
583 if (isset($filter[
'NAME_SEARCH']) || isset($filter[
'FIND']))
585 $nameSearch = isset($filter[
'NAME_SEARCH'])? $filter[
'NAME_SEARCH']: $filter[
'FIND'];
586 unset($filter[
'NAME_SEARCH']);
587 unset($filter[
'FIND']);
590 'FIND' => $nameSearch
593 else if ($server->getMethod() ==
"user.search")
595 $previousFilter = $filter;
596 unset($filter[
'NAME']);
597 unset($filter[
'LAST_NAME']);
598 unset($filter[
'SECOND_NAME']);
599 unset($filter[
'WORK_POSITION']);
600 unset($filter[
'UF_DEPARTMENT_NAME']);
603 'NAME' => $previousFilter[
'NAME'],
604 'LAST_NAME' => $previousFilter[
'LAST_NAME'],
605 'SECOND_NAME' => $previousFilter[
'SECOND_NAME'],
606 'WORK_POSITION' => $previousFilter[
'WORK_POSITION'],
607 'UF_DEPARTMENT_NAME' => $previousFilter[
'UF_DEPARTMENT_NAME'],
613 && Loader::includeModule(
"extranet")
616 $filteredUserIDs = \CExtranet::getMyGroupsUsersSimple(\CExtranet::getExtranetSiteID());
617 $filteredUserIDs[] = $USER->getID();
619 if (\CExtranet::isIntranetUser())
622 !isset($filter[
"ID"])
623 || !Loader::includeModule(
'socialnetwork')
624 || !\CSocNetUser::IsCurrentUserModuleAdmin(\CSite::getDefSite(),
false)
629 '!UF_DEPARTMENT' =>
false,
630 'ID' => $filteredUserIDs
636 $filter[
"ID"] = (isset($filter[
"ID"]) ? array_intersect((is_array($filter[
"ID"]) ? $filter[
"ID"] : array($filter[
"ID"])), $filteredUserIDs) : $filteredUserIDs);
640 if (array_key_exists(
'HAS_DEPARTAMENT', $filter))
642 if ($filter[
'HAS_DEPARTAMENT'] ===
'Y')
646 '!UF_DEPARTMENT' =>
false,
650 unset($filter[
'HAS_DEPARTAMENT']);
653 $filter[
'=IS_REAL_USER'] =
'Y';
655 $getListClassName =
'\Bitrix\Main\UserTable';
656 if (Loader::includeModule(
'intranet'))
658 $getListClassName =
'\Bitrix\Intranet\UserTable';
660 $getListMethodName =
'getList';
662 $navParams = self::getNavData($nav,
true);
667 $querySort[$sort] = $order;
669 $allowedFields = static::getAllowedUserFields($server->getAuthScope());
671 $dbRes = $getListClassName::$getListMethodName(
673 'order' => $querySort,
675 'select' => $allowedFields,
676 'limit' => $navParams[
'limit'],
677 'offset' => $navParams[
'offset'],
678 'data_doubling' =>
false,
679 'count_total' => $nav !== -1,
686 while ($userInfo = $dbRes->fetch())
690 if ($userInfo[
'PERSONAL_PHOTO'] > 0)
692 $files[] = $userInfo[
'PERSONAL_PHOTO'];
696 if (count($files) > 0)
698 $files = \CRestUtil::getFile($files, $resize);
700 foreach ($result as $key => $userInfo)
702 if ($userInfo[
'PERSONAL_PHOTO'] > 0)
704 $result[$key][
'PERSONAL_PHOTO'] = $files[$userInfo[
'PERSONAL_PHOTO']];
716 $count = $dbRes->getCount();
723 return self::setNavData(
727 'offset' => $navParams[
'offset']
737 $dbRes = UserTable::getList(array(
741 'select' => array(
'ID')
744 $onlineUsers = array();
745 while($userData = $dbRes->fetch())
747 $onlineUsers[] = $userData[
'ID'];
755 $arParams = array_change_key_case($arParams, CASE_UPPER);
759 $counters = \CUserCounter::GetAllValues($USER->getID());
761 if (!isset($arParams[
'SKIP_LIVEFEED_GROUP']) || $arParams[
'SKIP_LIVEFEED_GROUP'] !=
'Y')
763 $counters = \CUserCounter::getGroupedCounters($counters);
769 public static function userAdd($userFields, $nav = 0, \CRestServer $server =
null)
771 if (!is_null($server) && !static::isMainScope($server))
773 return static::getErrorScope();
776 global $APPLICATION, $USER;
778 static::checkAllowedFields();
785 $bB24 && $USER->canDoOperation(
'bitrix24_invite')
786 || $USER->canDoOperation(
'edit_all_users')
788 && Loader::includeModule(
'intranet'))
790 $userFields = array_change_key_case($userFields, CASE_UPPER);
795 isset($userFields[
"EXTRANET"])
796 && $userFields[
"EXTRANET"] ==
"Y"
799 if (IsModuleInstalled(
'extranet'))
802 $userFields[
"UF_DEPARTMENT"] = array();
804 if (!empty($userFields[
"SONET_GROUP_ID"]))
806 $sonetGroupId = $userFields[
"SONET_GROUP_ID"];
807 if (!is_array($sonetGroupId))
809 $sonetGroupId = array($sonetGroupId);
812 unset($userFields[
"SONET_GROUP_ID"]);
816 throw new \Exception(
'no_sonet_group_for_extranet');
820 unset($userFields[
"EXTRANET"]);
825 $userFields[
"EMAIL"] = trim($userFields[
"EMAIL"]);
826 if(check_email($userFields[
"EMAIL"]))
830 if(\CIntranetInviteDialog::checkUsersCount(1))
833 IsModuleInstalled(
'extranet')
834 && empty($inviteFields[
"UF_DEPARTMENT"])
838 throw new \Exception(
'no_extranet_field');
841 $inviteFields[
'EMAIL'] = $userFields[
"EMAIL"];
842 $inviteFields[
'ACTIVE'] = (isset($inviteFields[
'ACTIVE'])? $inviteFields[
'ACTIVE'] :
'Y');
843 $inviteFields[
'GROUP_ID'] = \CIntranetInviteDialog::getUserGroups($siteId, $bExtranet);
844 $inviteFields[
"CONFIRM_CODE"] = randString(8);
846 $ID = \CIntranetInviteDialog::RegisterUser($inviteFields);
849 throw new \Exception(implode(
"\n", $ID));
853 $obUser = new \CUser;
854 if(!$obUser->update($ID, $inviteFields))
856 throw new \Exception($obUser->LAST_ERROR);
859 $inviteFields[
'ID'] = $ID;
863 'TYPE' => Invitation::TYPE_EMAIL
866 \CIntranetInviteDialog::InviteUser(
868 (isset($userFields[
"MESSAGE_TEXT"])) ? htmlspecialcharsbx($userFields[
"MESSAGE_TEXT"]) : GetMessage(
"BX24_INVITE_DIALOG_INVITE_MESSAGE_TEXT_1")
873 && is_array($sonetGroupId)
874 && \CModule::IncludeModule(
'socialnetwork')
877 foreach($sonetGroupId as $groupId)
879 if (!\CSocNetUserToGroup::SendRequestToJoinGroup($USER->GetID(), $ID, $groupId,
"",
false))
881 if ($e = $APPLICATION->GetException())
883 throw new \Exception($e->GetString());
894 throw new \Exception(
'user_count_exceeded');
899 throw new \Exception(
'wrong_email');
904 throw new \Exception(
'access_denied');
910 public static function userUpdate($userFields, $nav = 0, \CRestServer $server =
null)
912 if (!is_null($server) && !static::isMainScope($server))
914 return static::getErrorScope();
919 static::checkAllowedFields();
923 $bAdmin = ($bB24 && $USER->canDoOperation(
'bitrix24_invite'))
924 || $USER->canDoOperation(
'edit_all_users');
926 $userFields = array_change_key_case($userFields, CASE_UPPER);
928 if($userFields[
'ID'] > 0)
930 if($bAdmin || ($USER->getID() == $userFields[
'ID'] && $USER->CanDoOperation(
'edit_own_profile')))
937 unset($updateFields[
'ACTIVE']);
938 unset($updateFields[
'UF_DEPARTMENT']);
942 $obUser = new \CUser;
943 if(!$obUser->update($userFields[
'ID'], $updateFields))
965 private static function prepareUserField($params, $data)
968 switch ($params[
'USER_TYPE_ID'])
971 $result = \CRestUtil::unConvertDateTime($data);
974 $result = \CRestUtil::unConvertDate($data);
979 if ($params[
'MULTIPLE'] ===
'N')
981 if (!empty($data[
'fileData']))
983 $result = \CRestUtil::saveFile($data[
'fileData']);
984 $result[
'old_id'] = $params[
'VALUE'];
986 $id = isset($data[
'id']) ? (int)$data[
'id'] : 0;
987 $remove = isset($data[
'remove']) && is_string($data[
'remove']) && mb_strtoupper($data[
'remove']) ===
'Y';
988 if ($remove && $id > 0)
998 if ($params[
'VALUE'])
1000 $result = array_merge($result, $params[
'VALUE']);
1003 foreach ($result as $key => $value)
1005 if ($value[
'fileData'])
1007 $result[$key] = \CRestUtil::saveFile($value[
'fileData']);
1011 $id = isset($value[
'id']) ? (int)$value[
'id'] : 0;
1012 $remove = isset($value[
'remove']) && is_string($value[
'remove']) && mb_strtoupper($value[
'remove']) ===
'Y';
1013 if ($remove && $id > 0)
1050 foreach($userData as $key => $value)
1054 $user[$key] = static::prepareUserValue($key, $value);
1061 private static function prepareUserValue($code, $value)
1065 if (is_array($value) && !empty($value))
1067 $value = array_map(
'intval', $value);
1071 $value = (int)($value);
1076 $value = ($value && $value !==
'N')?
'Y' :
'N';
1078 case 'AUTO_TIME_ZONE':
1079 $value = $value ===
'Y'?
'Y' :
'N';
1081 case 'PERSONAL_BIRTHDAY':
1082 $value = \CRestUtil::unConvertDate($value);
1084 case 'PERSONAL_PHOTO':
1086 $value = \CRestUtil::saveFile($value);
1095 case 'UF_DEPARTMENT':
1096 if(!is_array($value) && !empty($value))
1103 case 'CONFIRM_CODE':
1114 private static function prepareUserFilter($query,
$allowedUserFields =
null, $clearFilterType = []): array
1123 foreach ($query as $code => $value)
1127 if (preg_match(
'/^([\W]{1,2})(.+)/', $code, $matches) && $matches[2])
1129 $filterType = $matches[1];
1130 $code = $matches[2];
1135 if ($filterType !==
'' && in_array($code, $clearFilterType,
true))
1139 elseif ($filterType ===
'' && in_array($code, [
'USER_TYPE',
'ACTIVE'],
true))
1144 $filter[$filterType . $code] = static::prepareUserValue($code, $value);
1153 global $USER_FIELD_MANAGER;
1161 $userId = (int) $userData[
'ID'];
1163 $fieldsList = $USER_FIELD_MANAGER->getUserFields(
'USER', $userId, LANGUAGE_ID);
1165 foreach ($userData as $key => $value)
1169 if (mb_strpos($key, static::$nameFieldFullPrefix) === 0)
1171 $user[$key] = static::prepareUserField($fieldsList[$key], $value);
1175 $user[$key] = $value;
1181 if (isset($user[
'ACTIVE']))
1182 $user[
'ACTIVE'] = ($user[
'ACTIVE'] && $user[
'ACTIVE'] !=
'N') ?
'Y' :
'N';
1184 if (isset($user[
'PERSONAL_BIRTHDAY']))
1185 $user[
'PERSONAL_BIRTHDAY'] = \CRestUtil::unConvertDate($user[
'PERSONAL_BIRTHDAY']);
1187 if (isset($user[
'UF_DEPARTMENT']) && !is_array($user[
'UF_DEPARTMENT']) && !empty($user[
'UF_DEPARTMENT']))
1188 $user[
'UF_DEPARTMENT'] = array($user[
'UF_DEPARTMENT']);
1190 if (isset($user[
'PERSONAL_PHOTO']))
1192 $user[
'PERSONAL_PHOTO'] = \CRestUtil::saveFile($user[
'PERSONAL_PHOTO']);
1194 if (!$user[
'PERSONAL_PHOTO'])
1196 $user[
'PERSONAL_PHOTO'] = array(
'del' =>
'Y');
1200 $user = array_diff_key($user, array_fill_keys(static::$holdEditFields,
'Y'));
1205 protected static function getUserData($userFields, $allowedFields =
null)
1207 static $extranetModuleInstalled =
null;
1208 if ($extranetModuleInstalled ===
null)
1212 global $USER_FIELD_MANAGER;
1213 $fieldsList = $USER_FIELD_MANAGER->getUserFields(static::$entityUser, 0, LANGUAGE_ID);
1215 $urlManager = \Bitrix\Main\Engine\UrlManager::getInstance();
1218 if (is_null($allowedFields))
1220 $allowedFields = static::getDefaultAllowedUserFields();
1222 foreach ($allowedFields as $key)
1227 $res[$key] = $userFields[$key] ==
'Y';
1229 case 'PERSONAL_BIRTHDAY':
1230 case 'DATE_REGISTER':
1231 $res[$key] = \CRestUtil::convertDate($userFields[$key]);
1234 $res[$key] = \CRestUtil::convertDateTime($userFields[$key]);
1236 case 'EXTERNAL_AUTH_ID':
1237 $res[
'IS_NETWORK'] = $userFields[$key] ==
'replica';
1238 $res[
'IS_EMAIL'] = $userFields[$key] ==
'email';
1239 unset($userFields[$key]);
1242 if (!empty($fieldsList[$key]))
1244 if ($fieldsList[$key][
'USER_TYPE_ID'] ===
'date')
1246 if ($fieldsList[$key][
'MULTIPLE'] ===
'Y' && is_array($userFields[$key]))
1248 foreach ($userFields[$key] as $k => $value)
1250 $res[$key][$k] = \CRestUtil::convertDate($userFields[$key][$k]);
1255 $res[$key] = \CRestUtil::convertDate($userFields[$key]);
1258 elseif ($fieldsList[$key][
'USER_TYPE_ID'] ===
'datetime')
1260 if ($fieldsList[$key][
'MULTIPLE'] ===
'Y' && is_array($userFields[$key]))
1262 foreach ($userFields[$key] as $k => $value)
1264 $res[$key][$k] = \CRestUtil::convertDateTime($userFields[$key][$k]);
1269 $res[$key] = \CRestUtil::convertDateTime($userFields[$key]);
1272 elseif ($fieldsList[$key][
'USER_TYPE_ID'] ===
'file')
1274 if ($fieldsList[$key][
'MULTIPLE'] ===
'Y' && is_array($userFields[$key]))
1276 foreach ($userFields[$key] as $k => $value)
1279 'id' => $userFields[$key][$k],
1280 'showUrl' => $urlManager->create(
1283 'entity' => static::$entityUser,
1284 'id' => $userFields[
'ID'],
1286 'value' => $userFields[$key]
1290 'id' => $userFields[
'ID'],
1292 'value' => $userFields[$key][$k],
1300 'id' => $userFields[$key],
1301 'showUrl' => $urlManager->create(
1304 'entity' => static::$entityUser,
1305 'id' => $userFields[
'ID'],
1307 'value' => $userFields[$key]
1311 'id' => $userFields[
'ID'],
1313 'value' => $userFields[$key]
1320 if (!isset($res[$key]) && isset($userFields[$key]))
1322 $res[$key] = $userFields[$key];
1331 public static function getFile($query, $n, \CRestServer $server)
1334 return $file->getAction(static::$entityUser, $query[
'id'], $query[
'field'], $query[
'value'], $server);
1339 return \CSite::getDefSite();
static isModuleInstalled($moduleName)
static getUserSearchFilter(array $fields)