2namespace Bitrix\Rest\Api;
4use Bitrix\Rest\RestException;
5use Bitrix\Rest\UserFieldProxy;
9 private static $nameFullPrefix =
'UF_USR_';
10 private const ENTITY_ID =
'USER';
11 private const ALLOWED_FIELD_PROP_LIST = [
32 return static::ENTITY_ID;
40 if (isset(
$query[
'FIELDS']) && is_array(
$query[
'FIELDS']))
45 $instance =
new static(static::getTargetEntityId());
53 $id = (int)(
$query[
'ID'] ?? 0);
59 if (!static::checkAccessField($id))
65 if (isset(
$query[
'FIELDS']) && is_array(
$query[
'FIELDS']))
70 $instance =
new static(static::getTargetEntityId());
78 $id = (int)(
$query[
'ID'] ?? 0);
84 if (!static::checkAccessField($id))
89 $instance =
new static(static::getTargetEntityId());
103 if (isset(
$query[
'FILTER']) && is_array(
$query[
'FILTER']))
108 $instance =
new static(static::getTargetEntityId());
116 if (mb_strpos($item[
'FIELD_NAME'], static::$nameFullPrefix) !== 0)
130 return array_intersect_key(
$fields, array_fill_keys(self::ALLOWED_FIELD_PROP_LIST,
true));
133 private static function checkAccessField($fieldId)
138 $entity = new \CUserTypeEntity();
142 'ENTITY_ID' => static::getTargetEntityId(),
147 if ($field =
$res->fetch())
149 if (mb_strpos($field[
'FIELD_NAME'], static::$nameFullPrefix) === 0)
const SCOPE_USER_USERFIELD
static updateRest($query, $n, \CRestServer $server)
static addRest($query, $n, \CRestServer $server)
static deleteRest($query, $n, \CRestServer $server)
static getTargetEntityId()
static getListRest($query, $n, \CRestServer $server)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(empty($signedUserToken)) $key
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"