prepare('SELECT * FROM property_owners WHERE owner_id = ? LIMIT 1'); $stmt->execute([$ownerId]); $owner = $stmt->fetch(); if (!$owner) { json_error(404, 'Owner not found'); } if ((int) $owner['user_id'] !== (int) $user['id']) { json_error(403, 'No access to this owner'); } json_data(present_owner($owner));