60 $helper = $connection->getSqlHelper();
65 ->configureAutocomplete(),
75 ->configureValues(
'N',
'Y'),
78 ->configureValues(
'N',
'Y'),
84 $helper->getDatetimeToDateFunction(
'%s'),
86 )->configureValueType(DatetimeField::class),
92 $helper->getDatetimeToDateFunction(
'%s'),
94 )->configureValueType(DatetimeField::class),
110 ->addValidator(
new ORM\Fields\Validators\RegExpValidator(
'/^[a-z0-9]{2}$/')),
150 $helper->getConcatFunction(
153 "UPPER(" . $helper->getSubstrFunction(
"%s", 1, 1) .
")",
"'.'"
155 [
'LAST_NAME',
'NAME']
161 . $helper->addSecondsToDateTime(
'(-' . self::getSecondsForLimitOnline() .
')')
162 .
' THEN \'Y\' ELSE \'N\' END',
163 'LAST_ACTIVITY_DATE',
164 [
'values' => [
'N',
'Y']]
165 ))->configureValueType(BooleanField::class),
169 'CASE WHEN %s IN (\''
170 . join(
'\', \
'', static::getExternalUserTypes())
171 .
'\') THEN \
'N\' ELSE \'Y\' END',
173 [
'values' => [
'N',
'Y']]
174 ))->configureValueType(BooleanField::class),
178 UserIndexTable::class,
179 Join::on(
'this.ID',
'ref.USER_ID')
180 ))->configureJoinType(Join::TYPE_INNER),
184 UserCounterTable::class,
185 Join::on(
'this.ID',
'ref.USER_ID')->where(
'ref.CODE',
'tasks_effective')
189 UserPhoneAuthTable::class,
190 Join::on(
'this.ID',
'ref.USER_ID')
192 (
new OneToMany(
'GROUPS', UserGroupTable::class,
'USER'))
193 ->configureJoinType(Join::TYPE_INNER),
197 \
Bitrix\Main\Localization\LanguageTable::class,
198 Join::on(
'this.LANGUAGE_ID',
'ref.LID')->where(
'ref.ACTIVE',
'Y')
201 'NOTIFICATION_LANGUAGE_ID',
202 'CASE WHEN (%s IS NOT NULL AND %s = %s) THEN %s ELSE %s END',
204 'LANGUAGE_ID',
'LANGUAGE_ID',
'ACTIVE_LANGUAGE.LID',
'LANGUAGE_ID',
206 return new SqlExpression(
"'" . (($site = \CSite::GetList(
'',
'', [
'DEF' =>
'Y',
'ACTIVE' =>
'Y'])->fetch())
207 ? $site[
'LANGUAGE_ID'] : LANGUAGE_ID) .
"'");
210 ))->configureValueType(StringField::class),
392 $record = parent::getList([
393 'select' => static::getIndexedFields(),
394 'filter' => [
'=ID' => $id],
397 if (!is_array($record))
402 $record[
'UF_DEPARTMENT_NAMES'] = [];
406 foreach ($departmentNames as $departmentName)
408 $record[
'UF_DEPARTMENT_NAMES'][] = $departmentName[
'NAME'];
412 $departmentName = $record[
'UF_DEPARTMENT_NAMES'][0] ??
'';
413 $searchDepartmentContent = implode(
' ', $record[
'UF_DEPARTMENT_NAMES']);
417 'NAME' => (
string)$record[
'NAME'],
418 'SECOND_NAME' => (
string)$record[
'SECOND_NAME'],
419 'LAST_NAME' => (
string)$record[
'LAST_NAME'],
420 'WORK_POSITION' => (
string)$record[
'WORK_POSITION'],
421 'UF_DEPARTMENT_NAME' => (
string)$departmentName,
422 'SEARCH_USER_CONTENT' => self::generateSearchUserContent($record),
423 'SEARCH_ADMIN_CONTENT' => self::generateSearchAdminContent($record),
424 'SEARCH_DEPARTMENT_CONTENT' => MapBuilder::create()->addText($searchDepartmentContent)->build(),