1
0

fix(helpdesk): fix user-select empty options — use nested row structure fallback

DB::select with JOIN returns rows as $u['u']['field'] ?? $u['field'].

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
aminovfariz
2026-06-08 12:00:25 +02:00
parent e3dfdef76f
commit 0392043ee3

View File

@@ -79,9 +79,9 @@ $hasDiff = $fieldDiff !== [];
<?php if ($readonly): ?> disabled<?php endif; ?>
>
<?php foreach ($tenantUsers as $u):
$uId = (string) ($u['id'] ?? '');
$uName = trim((string) ($u['display_name'] ?? ''));
$uEmail = (string) ($u['email'] ?? '');
$uId = (string) ($u['u']['id'] ?? $u['id'] ?? '');
$uName = trim((string) ($u['u']['display_name'] ?? $u['display_name'] ?? ''));
$uEmail = (string) ($u['u']['email'] ?? $u['email'] ?? '');
$uLabel = $uName !== '' ? $uName : $uEmail;
?>
<option value="<?php e($uId); ?>"<?php if (in_array($uId, $selectedIds, true)): ?> selected<?php endif; ?>>