agent foundation
This commit is contained in:
@@ -251,7 +251,8 @@ class UserCustomFieldValueService
|
||||
}
|
||||
|
||||
$tenantIds = self::normalizeTenantIds($tenantIds);
|
||||
// Always clean values that belong to tenants no longer assigned to the user.
|
||||
// Always clean values for tenants no longer assigned — happens even when !$canEdit,
|
||||
// because orphaned custom field data should not persist after tenant reassignment.
|
||||
if (!UserCustomFieldValueRepository::deleteByUserOutsideTenantIds($userId, $tenantIds)) {
|
||||
return ['ok' => false, 'errors' => [t('Custom field values can not be saved')]];
|
||||
}
|
||||
@@ -454,6 +455,7 @@ class UserCustomFieldValueService
|
||||
continue;
|
||||
}
|
||||
|
||||
// URL key prefixes: cf_ = single-value (select/boolean), cfm_ = multiselect, cfd_ = date range.
|
||||
if (preg_match('/^cf_([a-f0-9-]{36})$/', $key, $match)) {
|
||||
$uuid = $match[1];
|
||||
$definition = $definitionMapByUuid[$uuid] ?? null;
|
||||
|
||||
Reference in New Issue
Block a user