25 public function execute(array &$option): bool
27 if (!Loader::includeModule(
'iblock'))
32 $emptyDepartmentTypeFirst = serialize([]);
33 $emptyDepartmentTypeSecond = serialize([0]);
34 $externalTypes = UserTable::getExternalUserTypes();
35 $externalTypes[] =
null;
37 '!=UF_DEPARTMENT' => [
null, $emptyDepartmentTypeFirst, $emptyDepartmentTypeSecond],
38 '!=EXTERNAL_AUTH_ID' => $externalTypes,
41 if (isset($option[
'lastId']))
43 $filter[
'>ID'] = (int)$option[
'lastId'];
46 $userData = UserTable::getList([
49 'limit' => self::PORTION,
54 $userIds = array_column($userData,
'ID');
57 $this->updateIblockAccess($userIds);
58 if (count($userIds) === self::PORTION)
60 $option[
'lastId'] = array_pop($userIds);