attributes->get('api_actor'); $data = $actor->toArray(); // Untuk LDAP JWT — enrich dengan data profile dari LDAP + metadata DB if ($actor->type === 'ldap_jwt') { $profile = $this->ldapAuth->getProfile($actor->identifier); $meta = $this->metadata->getUserMeta($actor->identifier); $data['display_name'] = $profile['display_name'] ?? $actor->identifier; $data['email'] = $profile['email'] ?? ''; $data['last_logon'] = $profile['last_logon'] ?? null; $data['domain'] = $profile['domain'] ?? ''; $data['phone'] = $meta['phone'] ?? ''; $data['other_email'] = $meta['other_email'] ?? ''; } return $this->ok($data); } }